public async Task DefineMaturtyModelAsync(MaturityModelDomain mm, int level) { if (CampLevel == null) { CampLevel = new List <KeyValuePair <Guid, float> >(); } CampLevel.Add(new KeyValuePair <Guid, float>(mm.MaturityModelId, level)); var mmRepo = UtilDomain.GetService <IMaturityModelRepository>(); await mmRepo.SaveCampAsync(this); }
public float LevelOfMaturity(Guid maturityModelId) { return(CampLevel.Where(c => c.Key == maturityModelId).Select(c => c.Value).FirstOrDefault()); }
public bool ContainsMaturity(Guid maturityModelId) { return(CampLevel.Any(c => c.Key == maturityModelId)); }