コード例 #1
0
        public ActionResult Edit(int id)
        {
            var postProfile = postProfileRepository.GetById(id);
            var viewModel   = Mapper.Map <PostProfile, PostProfileFormModel>(postProfile);

            return(View(viewModel));
        }
コード例 #2
0
        public ICommandResult Execute(DeletePostProfileCommand command)
        {
            var postProfile = postProfileRepository.GetById(command.ProfileId);

            postProfileRepository.Delete(postProfile);
            unitOfWork.Commit();
            return(new CommandResult(true));
        }