public void Insert(UserSetting entity)
 {
     if (entity == null)
     {
         throw new ArgumentNullException(nameof(entity));
     }
     _context.UserSettings.Add(entity);
     _context.SaveChanges();
 }
Exemplo n.º 2
0
        public void Delete(OrderItem entity)
        {
            if (entity == null)
            {
                throw new ArgumentNullException(nameof(entity));
            }

            _context.OrderItems.Remove(entity);
            _context.SaveChanges();
        }
Exemplo n.º 3
0
        public void Delete(Product entity)
        {
            if (entity == null)
            {
                throw new ArgumentNullException(nameof(entity));
            }

            _context.Products.Remove(entity);
            _context.SaveChanges();
        }
Exemplo n.º 4
0
        public void Delete(Category entity)
        {
            if (entity == null)
            {
                throw new ArgumentNullException(nameof(entity));
            }

            _context.Categories.Remove(entity);
            _context.SaveChanges();
        }