public async Task <ActionResult> Add(int vendorId) { var vendor = _getVendorByIdQuery.Execute(vendorId); var apiFacade = await _odsApiFacadeFactory.Create(); var leas = apiFacade.GetAllLocalEducationAgencies().ToList(); var schools = apiFacade.GetAllSchools().ToList(); var profiles = _mapper.Map <List <ProfileModel> >(_getProfilesQuery.Execute()); var model = new AddApplicationViewModel { VendorId = vendorId, VendorName = vendor.VendorName, LocalEducationAgencies = leas, Schools = schools, ClaimSetNames = GetClaimSetNames(), Profiles = profiles }; return(PartialView("_AddApplicationModal", model)); }
public void Should_retreive_profiles() { var profile1 = CreateProfile(); var profile2 = CreateProfile(); Save(profile1, profile2); var query = new GetProfilesQuery(TestContext); var results = query.Execute(); results.Any(p => p.ProfileName == profile1.ProfileName).ShouldBeTrue(); results.Any(p => p.ProfileName == profile2.ProfileName).ShouldBeTrue(); }
public void Should_retreive_profiles() { var profile1 = CreateProfile(); var profile2 = CreateProfile(); Save(profile1, profile2); List <Profile> results = null; Scoped <IUsersContext>(usersContext => { var query = new GetProfilesQuery(usersContext); results = query.Execute(); }); results.Any(p => p.ProfileName == profile1.ProfileName).ShouldBeTrue(); results.Any(p => p.ProfileName == profile2.ProfileName).ShouldBeTrue(); }