Exemplo n.º 1
0
        public bool DeleteDeleteStatus(console.Models.tbl_OrderStatus entity)
        {
            bool result = false;

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

            using (var context = new console.Models.dream_techContext())
            {
                tbl_OrderStatus status = (from s in context.tbl_OrderStatus where s.status_id == entity.status_id select s).First();

                status.status = entity.status;

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