public async Task <ActionResult <Picture> > DeletePicture(int id) { var picture = await _IPicture.FindAsync(id); if (picture == null) { return(NotFound()); } _IPicture.Remove(picture); await _IPicture.SaveAsync(); return(picture); }