public void DeleteScreen(int id) { _screenRepository.DeleteScreen(id); _cache.RemoveValueFromCache(AllScreens); _cache.RemoveValueFromCache(SingleScreen + id); _logger.LogInformation($"Remove all screens and screen {id} from cache"); }
public ActionResult Delete(Guid id) { try { db.DeleteScreen(id); return(NoContent()); } catch (NotFoundException aex) { return(NotFound(aex.Message)); } catch (Exception ex) { return(InternalServerError($"Unable to process request. Details: { ex.ToString()}")); } }