This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hey Guys, Just wondering there is a nice way to control the code that the UniqueValidate attribute generates, not so keen on select (*) and given some db security requirements we'd like to remove all select permissions and have any access go via stored procs, i'm guessing there is no quick way to control this without overriding onValidate or something like that? |
|
|
You can't customise the SQL for unique validation, but you can create a custom validation that fires off a custom query to the database. The ValidationContext includes a UnitOfWork property, and you can use UnitOfWork.Context.DataProviderObjectFactory to create a suitable IDbCommand and UnitOfWork.PrepareCommand to hook it up to the UOW's connection and transaction. |
|