Ejemplo n.º 1
0
        public bool DeletePrice(console.Models.btl_ProductPrice entity)
        {
            bool result = false;

            using (var context = new console.Models.dream_techContext())
            {
                context.btl_ProductPrice.Remove(entity);
                result = context.SaveChanges() > 1;
            }
            return(result);
        }
Ejemplo n.º 2
0
        public bool UpdatePrice(console.Models.btl_ProductPrice entity)
        {
            bool result = false;

            using (var context = new console.Models.dream_techContext())
            {
                btl_ProductPrice price = (from p in context.btl_ProductPrice where p.price_id == entity.price_id select p).First();

                price.product_price = entity.product_price;

                result = context.SaveChanges() > 1;
            }
            return(result);
        }