Example #1
0
        public void DeletePrenda(int id)
        {
            try
            {
                var prenda = dbContext.Prendas.Find(id);
                if (prenda == null)
                {
                    throw new ArgumentException("La prenda no existe");
                }

                dbContext.Remove(prenda);
                dbContext.SaveChanges();
            }catch (Exception e)
            {
                throw e;
            }
        }