WithRules() public method

Creates a new data source with additional audit rules.
public WithRules ( ) : SQLiteDataSource
return SQLiteDataSource
Exemplo n.º 1
0
 public SQLiteDataSource AttachRules(SQLiteDataSource source)
 {
     return source.WithRules(
         new DateTimeRule("CreatedDate", DateTimeKind.Local, OperationTypes.Insert),
         new DateTimeRule("UpdatedDate", DateTimeKind.Local, OperationTypes.InsertOrUpdate),
         new UserDataRule("CreatedByKey", "EmployeeKey", OperationTypes.Insert),
         new UserDataRule("UpdatedByKey", "EmployeeKey", OperationTypes.InsertOrUpdate),
         new ValidateWithValidatable(OperationTypes.InsertOrUpdate)
         );
 }