/// <summary> /// Método construtor da Entidade que recebe um comando para criação de um Log de Projeto /// </summary> /// <param name="command">Comando de criação do Log</param> public ProjectLog(CreateProjectLogCommand command) { ProjectLogId = Guid.NewGuid(); CreatedOn = command.CreatedOn; Description = command.Description; LogType = command.LogType; }
public ProjectLog Create(CreateProjectLogCommand command) { var projectLog = new ProjectLog(command); _repository.Create(projectLog); projectLog.CreateProjectLog(projectLog); if (Commit()) { return(projectLog); } return(null); }