public void Insert(UserSetting entity) { if (entity == null) { throw new ArgumentNullException(nameof(entity)); } _context.UserSettings.Add(entity); _context.SaveChanges(); }
public void Delete(OrderItem entity) { if (entity == null) { throw new ArgumentNullException(nameof(entity)); } _context.OrderItems.Remove(entity); _context.SaveChanges(); }
public void Delete(Product entity) { if (entity == null) { throw new ArgumentNullException(nameof(entity)); } _context.Products.Remove(entity); _context.SaveChanges(); }
public void Delete(Category entity) { if (entity == null) { throw new ArgumentNullException(nameof(entity)); } _context.Categories.Remove(entity); _context.SaveChanges(); }