public void Delete(int id) { var result = warehouseContext.Set <T>().Find(id); warehouseContext.Remove(result); warehouseContext.SaveChanges(); }
private async Task OverwriteExistingModel(IModel modelToPut, T existingModel) { _context.Remove(existingModel); await AddModelAsync(modelToPut); }