public IHttpActionResult Delete(int id) { var file = fileRepo.GetById(id); if (file == null) { return(Content(HttpStatusCode.NotFound, "Item does not exist")); } fileRepo.Delete(file); return(Ok(file)); }