public Reply Update(UpdateReplyCommand command) { var Reply = _repository.GetOne(command.Id); if (!string.IsNullOrEmpty(command.BodyReply)) { Reply.ChangeBodyReply(command.BodyReply); } Reply.ChangeStatus(command.Status); _repository.Update(Reply); if (Commit()) { return(Reply); } return(null); }
public Reply Update(UpdateReplyCommand command) { var Reply = _repository.GetOne(command.Id); if (!string.IsNullOrEmpty(command.BodyReply)) Reply.ChangeBodyReply(command.BodyReply); Reply.ChangeStatus(command.Status); _repository.Update(Reply); if (Commit()) return Reply; return null; }