public ActionResult DeleteDiary(long diaryId) { try { var diary = _diaryService.GetById(diaryId); if (diary != null) { _diaryService.Delete(diary); } } catch (Exception e) { return(BadRequest(e.InnerException.Message)); } return(NoContent()); }
public void RemoveDiary(int id) { _diaryService.Delete(id); }
public async Task <ActionResponse <DiaryDto> > Delete([FromBody] SimpleRequestBase request) { return(await diaryService.Delete(request.Id)); }