I just want to note that you don't
need to use c# for this. You can implement your rules through stored procedures. Calls to the database through these procedures would ensure your requirements are met. Create a database account that does not have table-level privileges and allow allow access through those procs. Any .NET language could be used for this.
If you're looking for a pure CLR solution you can also try this
walkthrough[
^].
Cheers.