CrudOperationAttribute
This article is relevant to entity models that utilize the deprecated Visual Studio integration of Telerik Data Access. The current documentation of the Data Access framework is available here.
Use CrudOperationAttribute to specify the usage of a certain stored procedure in a class. This is useful when all load, create, update, delete operations should be accomplished through stored procedures. CrudOperationAttribute exposes four properties:
- UpdateProcedureName - sets the name of the stored procedure used for update operations.
- InsertProcedureName - sets the name of the stored procedure used for insert operations.
- DeleteProcedureName - sets the name of the stored procedure used for delete operations.
- RetreiveProcedureName - sets the name of the stored procedure used for retreive operations.
[TableAttribute( "Invoice" )]
[CrudOperation( DeleteProcedureName = "DeleteInvoice",
RetrieveProcedureName = "LoadInvoice" )]
public class Invoice
{
[Column( "Id" )]
public int Id
{
get;
set;
}
}
<TableAttribute("Invoice"), CrudOperation(DeleteProcedureName := "DeleteInvoice",
RetrieveProcedureName := "LoadInvoice")>
Public Class Invoice
<Column("Id")>
Public Property Id() As Integer
End Class