Ejemplo n.º 1
0
 public static object ExecuteScalar(this ObjectContext db, TemplateQuery query)
 {
     using (var r = DbReader.CreateCommand(db, query))
     {
         return(r.Command.ExecuteScalar());
     }
 }
Ejemplo n.º 2
0
 public static int ExecuteNonQuery(this DbContext db, TemplateQuery query)
 {
     using (var r = DbReader.CreateCommand(db, query))
     {
         return(r.Command.ExecuteNonQuery());
     }
 }