Exemple #1
0
 public static int Count(
     EntityApi api, string tableName)
 {
     return(Sql
            .CreateSelect(tableName)
            .Count(api));
 }
Exemple #2
0
 public static IQueryable <IEntity> All(
     EntityApi api, string tableName)
 {
     return(Sql
            .CreateSelect(tableName)
            .Query(api));
 }
Exemple #3
0
 public static IEntity Get(
     EntityApi api, string tableName, params Any[] conditions)
 {
     return(Sql
            .CreateSelect(tableName)
            .Where(conditions)
            .QueryFirst(api));
 }
Exemple #4
0
 public static bool Exists(
     EntityApi api, string tableName, params Any[] conditions)
 {
     return(Sql
            .CreateSelect(tableName)
            .Where(conditions)
            .Exists(api));
 }
Exemple #5
0
 public DataResult Remove(EntityApi api)
 {
     return(api.Delete(this));
 }
Exemple #6
0
 public DataResult Modify(EntityApi api)
 {
     return(api.Update(this));
 }
Exemple #7
0
 public DataResult Add(EntityApi api)
 {
     return(api.Insert(this));
 }