public StrongPoint Update(ChangeStrongPointCommand command) { var StrongPoint = _repository.GetOne(command.Id); if (!string.IsNullOrEmpty(command.Name)) { StrongPoint.ChangeName(command.Name); } if (!string.IsNullOrEmpty(command.Description)) { StrongPoint.ChangeDescription(command.Description); } StrongPoint.ChangeClass(command.Class); _repository.Update(StrongPoint); if (Commit()) { return(StrongPoint); } return(null); }
public StrongPoint Update(ChangeStrongPointCommand command) { var StrongPoint = _repository.GetOne(command.Id); if(!string.IsNullOrEmpty(command.Name)) StrongPoint.ChangeName(command.Name); if (!string.IsNullOrEmpty(command.Description)) StrongPoint.ChangeDescription(command.Description); StrongPoint.ChangeClass(command.Class); _repository.Update(StrongPoint); if (Commit()) return StrongPoint; return null; }