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