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)); }
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())); }
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)); }