예제 #1
0
 public static async Task <object> ExecuteScalarAsync(this ObjectContext db, TemplateQuery query)
 {
     using (var r = await DbReader.CreateCommandAsync(db, query))
     {
         return(await r.Command.ExecuteScalarAsync());
     }
 }
예제 #2
0
 public static async Task <int> ExecuteNonQueryAsync(this DbContext db, TemplateQuery query)
 {
     using (var r = await DbReader.CreateCommandAsync(db, query))
     {
         return(await r.Command.ExecuteNonQueryAsync());
     }
 }