示例#1
0
 public static Grouped <T> SelectAllGroupedBy <T>(string sql, Func <T, int> groupId, params object[] parameters) where T : new()
 {
     return(new Grouped <T>(Executer.ExecuteReader <T>(sql, parameters), groupId));
 }
示例#2
0
 public static T[] SelectAll <T>(string sql, params object[] parameters) where T : new()
 {
     return(Executer.ExecuteReader <T>(sql, parameters).ToArray());
 }
示例#3
0
 public static int ExecuteAll <T>(string sql, params object[] parameters)
 {
     return(Executer.ExecuteNonQuery <T>(sql, parameters));
 }
示例#4
0
 public static int ExecuteInt <T>(string sql, params object[] parameters)
 {
     return(Convert.ToInt32(Executer.ExecuteScalar <T>(sql, parameters)));
 }
示例#5
0
 public static T SelectFirst <T>(string sql, params object[] parameters) where T : new()
 {
     return(Executer.ExecuteReader <T>(sql, parameters).FirstOrDefault());
 }