Beispiel #1
0
 protected IDbCommandBuilder ToCommand()
 {
     if (_context == null)
     {
         throw new InvalidOperationException("No context to execute against.");
     }
     return(_context
            .Command(Build())
            .WithParameters(_parameters));
 }
Beispiel #2
0
 public async Task <IList <PurchaseOrder> > GetPurchaseOrdersToadstool()
 {
     return(await _context
            .Command(_select)
            .ToListAsync <PurchaseOrder>());
 }
Beispiel #3
0
 public Result <object> Add(T entity)
 => _context.Command(db => db.Insert <T>(entity));
Beispiel #4
0
 public Result <IEnumerable <T> > Get(object filter = null)
 => filter == null
     ? _context.Command(db => db.Query <T>())
     : _context.Command(db => db.Query <T>(filter));