Exemplo n.º 1
0
        public static bool Delete(int id)
        {
            int    returnValue;
            Imagen imagen = new Imagen()
            {
                ImagenId = id
            };

            using (var model = new AlmacenDBContext())
            {
                model.Remove(imagen);
                returnValue = model.SaveChanges();
            }
            return(Convert.ToBoolean(returnValue));
        }
Exemplo n.º 2
0
        public static bool Delete(int id)
        {
            int       returnValue;
            Categoria categoria = new Categoria()
            {
                CategoriaId = id
            };

            using (var model = new AlmacenDBContext())
            {
                model.Remove(categoria);
                returnValue = model.SaveChanges();
            }
            return(Convert.ToBoolean(returnValue));
        }
Exemplo n.º 3
0
        public static bool Delete(int id)
        {
            int      returnValue;
            Producto producto = new Producto()
            {
                ProductoId = id
            };

            using (var model = new AlmacenDBContext())
            {
                model.Remove(producto);
                returnValue = model.SaveChanges();
            }
            return(Convert.ToBoolean(returnValue));
        }
Exemplo n.º 4
0
        public static bool Delete(int id)
        {
            int    returnValue;
            Bodega bodega = new Bodega()
            {
                BodegaId = id
            };

            using (var model = new AlmacenDBContext())
            {
                model.Remove(bodega);
                returnValue = model.SaveChanges();
            }
            return(Convert.ToBoolean(returnValue));
        }