public async Task <MaturityModelCreateResponse> CreateMaturity(MaturityModelCreateRequest request)
        {
            var mm = await MaturityModelDomain.CreateAsync(request.Name, request.Description, request.Order);

            return(new MaturityModelCreateResponse
            {
                MaturityModelId = mm.MaturityModelId
            });
        }
        public static async Task <MaturityModelDefined> CreateAsync(ProjectDomain project, MaturityModelDomain maturity, int value)
        {
            var mm = new MaturityModelDefined {
                MaturityModelId = maturity.MaturityModelId,
                ProjectId       = project.ProjectId,
                Value           = value
            };

            var projectRepo = UtilDomain.GetService <IProjectRepository>();
            await projectRepo.AddMaturityModel(mm);

            return(mm);
        }
 public ChapterMaturityModelNotFoundException(MaturityModelDomain mmDomain, params Guid[] chapterId) : base($"Chapters {string.Concat(", ", chapterId.Select(c => c.ToString()).ToArray())} not found to set a {mmDomain.Name}")
 {
 }
Exemplo n.º 4
0
 public DefineOptionMaturityModelNotFoundException(ProjectDomain project, MaturityModelDomain model, int value) : base($"Not found value {value} Maturity Model {model.Name} at project {project.Name}")
 {
 }
 public OptionMaturityModelAlreadyExistsException(MaturityModelDomain mmDomain, int value) : base($"Value Option {value} already exists Maturity Model {mmDomain.Name}")
 {
 }
 public OptionMaturityModelNotFoundException(MaturityModelDomain mmDomain, int value) : base($"Option {value} not found at Maturity Model {mmDomain.Name}")
 {
 }
Exemplo n.º 7
0
 public async Task SaveAsync(MaturityModelDomain mm)
 {
     await maturityModelsDatabase.ReplaceOneAsync(m => m.MaturityModelId == mm.MaturityModelId, mm, new ReplaceOptions { IsUpsert = true });
 }