Пример #1
0
 public static object ExecuteScalar(this ObjectContext db, TemplateQuery query)
 {
     using (var r = DbReader.CreateCommand(db, query))
     {
         return(r.Command.ExecuteScalar());
     }
 }
Пример #2
0
 public static int ExecuteNonQuery(this DbContext db, TemplateQuery query)
 {
     using (var r = DbReader.CreateCommand(db, query))
     {
         return(r.Command.ExecuteNonQuery());
     }
 }