예제 #1
0
        public static NoticeBoardEditViewModel ToNoticeBoardEditViewModel(NoticeBoard nb)
        {
            NoticeBoardEditViewModel vm = new NoticeBoardEditViewModel
            {
                Id          = nb.NoticeBoardId,
                Title       = nb.Title,
                Description = nb.Description,
                IsMandatory = nb.IsMandatory
            };

            return(vm);
        }
예제 #2
0
        public static NoticeBoard From(NoticeBoardEditViewModel vm)
        {
            NoticeBoard noticeBoard = new NoticeBoard
            {
                NoticeBoardId = vm.Id,
                Title         = vm.Title,
                Description   = vm.Description,
                IsMandatory   = vm.IsMandatory
            };

            return(noticeBoard);
        }