/// <summary> /// Método construtor da Entidade que recebe um comando de criação /// </summary> /// <param name="command">Comando de criação com as propriedades da Entidade</param> public ProjectIntegration(CreateProjectIntegrationCommand command) { ProjectIntegrationId = Guid.NewGuid(); ServerPath = command.ServerPath; Username = command.Username; Password = command.Password; DeleteFile = command.DeleteFile; FirstMigrationDate = command.FirstMigrationDate; LastMigrationDate = command.LastMigrationDate; MigrationInterval = command.MigrationInterval; IntervalType = command.IntervalType; }
public ProjectIntegration Create(CreateProjectIntegrationCommand command) { var projectIntegration = new ProjectIntegration(command); projectIntegration.CreateProjectIntegration(projectIntegration); _repository.Create(projectIntegration); if (Commit()) { return(projectIntegration); } return(null); }