public IEnumerable <Discount> GetAll() { var table = new Discounts(); var result = table.All(); return(result.Select(row => new Discount(row))); }
public Discount GetByCode(string code) { var table = new Discounts(); var result = table.All(where: "WHERE Code = @0", limit: 1, args: code); return new Discount(result); }
public Discount GetByCode(string code) { var table = new Discounts(); var result = table.All(where : "WHERE Code = @0", limit: 1, args: code); return(new Discount(result)); }
public IEnumerable<Discount> GetAll() { var table = new Discounts(); var result = table.All(); return result.Select(row => new Discount(row)); }