예제 #1
0
        public mesa Obtener(int id)
        {
            var empre = new mesa();

            try
            {
                using (var db = new RrestauranteModel())
                {
                    empre = db.mesa.Where(x => x.mesa_id == id).SingleOrDefault();
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(empre);
        }
예제 #2
0
        public mesa DesactivarMesa(int id)
        {
            var mesa = new mesa();

            try
            {
                using (var db = new RrestauranteModel())
                {
                    mesa        = db.mesa.Find(id);
                    mesa.estado = "Inactivo";
                    db.SaveChanges();
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(mesa);
        }