public static NoticeBoardEditViewModel ToNoticeBoardEditViewModel(NoticeBoard nb) { NoticeBoardEditViewModel vm = new NoticeBoardEditViewModel { Id = nb.NoticeBoardId, Title = nb.Title, Description = nb.Description, IsMandatory = nb.IsMandatory }; return(vm); }
public static NoticeBoard From(NoticeBoardEditViewModel vm) { NoticeBoard noticeBoard = new NoticeBoard { NoticeBoardId = vm.Id, Title = vm.Title, Description = vm.Description, IsMandatory = vm.IsMandatory }; return(noticeBoard); }