public ActionResult DeleteStorage(int id) { var modelFromRepo = _repository.GetStorageById(id); if (modelFromRepo == null) { return(NotFound()); } _repository.DeleteStorage(modelFromRepo); _repository.SaveChanges(); return(NoContent()); }