示例#1
0
        public Task Update(PartnerProductModel model)
        {
            string sql =
                @"UPDATE partner_products SET ProductId=@ProductId, ProductPartnerPrice=@ProductPartnerPrice,  ProductCount=@ProductCount WHERE PartnerProductId=@PartnerProductId";

            return(_db.ExecuteSQLQuery(sql, model));
        }
示例#2
0
        public Task Remove(PartnerProductModel model)
        {
            string sql =
                @"DELETE FROM partner_products WHERE PartnerProductId=@PartnerProductId";

            return(_db.ExecuteSQLQuery(sql, model));
        }
示例#3
0
        public Task <int> Add(PartnerProductModel model)
        {
            string sql = @"insert into partner_products (ProductId, ProductPartnerPrice, ProductCount) 
values (@ProductId, @ProductPartnerPrice, @ProductCount); select scope_identity()";

            return(_db.InsertDataIntoDatabase(sql, model));
        }