public PostgreSqlDataSource AttachSoftDeleteRulesWithUser(PostgreSqlDataSource source) { var currentUser1 = source.From(EmployeeTableName).WithLimits(1).ToObject <Employee>().Execute(); return(source.WithRules( new SoftDeleteRule("DeletedFlag", true), new UserDataRule("DeletedByKey", "EmployeeKey", OperationTypes.Delete), new DateTimeRule("DeletedDate", DateTimeKind.Local, OperationTypes.Delete) ).WithUser(currentUser1)); }
public void Warmup_PostgreSql() { //Preload all of the database metadata to warmup the data source PostgreSqlDataSource.DatabaseMetadata.Preload(); PostgreSqlDataSource.From("HR.EmployeeClassification", "1=0").Compile().ToObjectOrNull <EmployeeClassification>().Execute(); }