public static DataBase.Problem ConvertToDBProblem(ExpertChoicesModels.Problem problemModel) { return(new DataBase.Problem { Name = problemModel.Name, Description = problemModel.Description, IdProblem = problemModel.Id }); }
public void Setup() { #region Test data //Admin expert1 = new ExpertChoicesModels.Expert { Id = 1, Name = "Sonya" }; expert2 = new ExpertChoicesModels.Expert { Id = 2, Name = "Misha" }; expert3 = new ExpertChoicesModels.Expert { Id = 3, Name = "Eva" }; //Analytic problem = new ExpertChoicesModels.Problem { Name = "When to go to cinema" }; alt1 = new ExpertChoicesModels.Alternative { Name = "Sunday" }; alt2 = new ExpertChoicesModels.Alternative { Name = "Saturday" }; alt3 = new ExpertChoicesModels.Alternative { Name = "Monday" }; //Experts expEstimations1 = new Estimation <ExpertChoicesModels.Expert, ExpertChoicesModels.Expert> { Estimator = expert1, Estimated = new Dictionary <ExpertChoicesModels.Expert, int?> { { expert2, null }, { expert3, null }, } }; expEstimations2 = new Estimation <ExpertChoicesModels.Expert, ExpertChoicesModels.Expert> { Estimator = expert2, Estimated = new Dictionary <ExpertChoicesModels.Expert, int?> { { expert1, null }, { expert3, null }, } }; expEstimations3 = new Estimation <ExpertChoicesModels.Expert, ExpertChoicesModels.Expert> { Estimator = expert3, Estimated = new Dictionary <ExpertChoicesModels.Expert, int?> { { expert1, null }, { expert2, null }, } }; altEstimations1 = new Estimation <ExpertChoicesModels.Expert, ExpertChoicesModels.Alternative> { Estimator = expert1, Estimated = new Dictionary <ExpertChoicesModels.Alternative, int?> { { alt1, null }, { alt2, null }, { alt3, null } } }; altEstimations2 = new Estimation <ExpertChoicesModels.Expert, ExpertChoicesModels.Alternative> { Estimator = expert2, Estimated = new Dictionary <ExpertChoicesModels.Alternative, int?> { { alt1, null }, { alt2, null }, { alt3, null } } }; altEstimations3 = new Estimation <ExpertChoicesModels.Expert, ExpertChoicesModels.Alternative> { Estimator = expert3, Estimated = new Dictionary <ExpertChoicesModels.Alternative, int?> { { alt1, null }, { alt2, null }, { alt3, null } } }; //Server problem.AlternativesEstimations = new List <Estimation <ExpertChoicesModels.Expert, ExpertChoicesModels.Alternative> > { altEstimations1, altEstimations2, altEstimations3 }; problem.ExpertsEstimations = new List <Estimation <ExpertChoicesModels.Expert, ExpertChoicesModels.Expert> > { expEstimations1, expEstimations2, expEstimations3 }; #endregion }