Beispiel #1
0
 public static int Insert <T>(this DbContext connInfo, T record, SqlFunction repl = null, Expression <Func <T, object> > onlyFields = null, string tableName = "")
     where T : new()
 {
     return(InsertPrimitive <T>(connInfo, new[] { record }, repl, SmartCrudHelper.GetPropertyNames <T>(onlyFields), tableName));
 }
Beispiel #2
0
 public static SqlFunction CreateDbNowFunction <T>(this DbContext conn, Expression <Func <T, object> > expr) where T : class, new()
 {
     return(conn.CreateDbNowFunction(SmartCrudHelper.GetPropertyNames <T>(expr)?.ToArray()));
 }
Beispiel #3
0
 public static T Select <T>(this DbContext connInfo, object[] pkValues, Expression <Func <T, object> > onlyFields = null, bool isExceptField = false, string tableName = "", bool forUpdate = false)
     where T : new()
 {
     return(SelectPrimitive <T>(connInfo, pkValues, SmartCrudHelper.GetPropertyNames <T>(onlyFields), isExceptField, tableName, forUpdate: forUpdate));
 }