public ReferViewModel?GetDiary(int id)
        {
            DiaryModel diary = _service.Diary(id);

            if (diary == null)
            {
                return(null);
            }

            ReferViewModel?viewModel = new ReferViewModel
            {
                Id      = diary.Id,
                Title   = diary.Title,
                Content = diary.Content,
            };

            return(viewModel);
        }
 public DiaryModel Diary(int id) => _service.Diary(id);