示例#1
0
        public void Delete(int id)
        {
            var result = warehouseContext.Set <T>().Find(id);

            warehouseContext.Remove(result);
            warehouseContext.SaveChanges();
        }
示例#2
0
 private async Task OverwriteExistingModel(IModel modelToPut, T existingModel)
 {
     _context.Remove(existingModel);
     await AddModelAsync(modelToPut);
 }