Published by Hector Ramos
We recently published a sample web application on GitHub that demonstrates how to use the Elastic SQL client libraries to build your first multi-tenant application. In an effort to stay up to date with the latest enhancements to the framework, some changes where recently committed to cleanup the shard provisioning process and to enable row level security on the sample schema.
The row level security script was supplied by Raul Garcia @ Microsoft and works by applying a security trimming predicate to all tables in a database. This script works best when executing SELECT statements. Although the ideal scenario would also block invalid updates/inserts on rows with an incorrect TenantId, you will still need to apply your own scripts to handle these scenarios and/or control the logic through your data tier. Take a look at the sample application and let us know if you have any questions or issues.