/// <summary> /// Search all profile tests looking for matches with the provided selected /// profile and provided selected test. /// </summary> /// <param name="profile">the profile to look for</param> /// <param name="tests">the tests to look for</param> /// <returns>An IEnumerable of profile tests matching both the criteria</returns> private IEnumerable <ProfileConfigProfileTestsModel> FilterProfileTestsByProfileAndTestDesc (ProfileConfigModel profile, ProfileConfigTestModel tests) { return(from profileTests in AllProfileTests where profileTests.TestDescription == tests.TestDescription && profileTests.ProfileDescription == profile.ProfileDescription select profileTests); }
private void InitializeDemoData() { //All tests var t1 = new ProfileConfigTestModel() { Id = 213, TestDescription = "TBIL" }; var t2 = new ProfileConfigTestModel() { Id = 563, TestDescription = "DBIL" }; //Profiles var p1 = new ProfileConfigModel() { Id = 1, ProfileDescription = "Liver Profile", State = State.Clean }; var p2 = new ProfileConfigModel() { Id = 2, ProfileDescription = "Lipid Profile", State = State.Clean }; //Profile Tests var pt1 = new ProfileConfigProfileTestsModel() { Id = 1, ProfileDescription = "Liver Profile", TestDescription = "TBIL", State = State.Clean }; var pt2 = new ProfileConfigProfileTestsModel() { Id = 2, ProfileDescription = "Liver Profile", TestDescription = "DBIL", State = State.Clean }; //Add All Tests this.Tests.Add(t1); this.Tests.Add(t2); //Add profiles ProfileList.Add(p1); ProfileList.Add(p2); //Add profile tests to all profile tests model. AllProfileTests.Add(pt1); AllProfileTests.Add(pt2); }