public ActionResult Edit(int id) { var postProfile = postProfileRepository.GetById(id); var viewModel = Mapper.Map <PostProfile, PostProfileFormModel>(postProfile); return(View(viewModel)); }
public ICommandResult Execute(DeletePostProfileCommand command) { var postProfile = postProfileRepository.GetById(command.ProfileId); postProfileRepository.Delete(postProfile); unitOfWork.Commit(); return(new CommandResult(true)); }