Пример #1
0
        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);
        }
Пример #3
0
        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));
        }