public void RefreshData() { Speakers = null; ConferenceDataContext dc = new ConferenceDataContext("isostore:/conference.sdf"); if (dc.DatabaseExists()) { Speakers = dc.Speakers.OrderBy(s => s.FirstName).ToList(); } }
public void RefreshData() { Sessions = null; ConferenceDataContext dc = new ConferenceDataContext("isostore:/conference.sdf"); if (dc.DatabaseExists()) { Sessions = dc.Sessions.OrderBy(r => r.Title).ToList(); Tags = dc.Tags.ToList().OrderBy(t => t.Title).ToList(); } RefreshSavedSessions(dc); }
public HttpBase() { var builder = new WebHostBuilder() .ConfigureAppConfiguration((hosting, config) => { }) .UseEnvironment("testing") .UseStartup <Startup>(); var server = new TestServer(builder); Client = server.CreateClient(); Context = server.Host.Services.GetService(typeof(ConferenceDataContext)) as ConferenceDataContext; }
public void RefreshSavedSessions(ConferenceDataContext dc) { if (dc == null) { dc = new ConferenceDataContext("isostore:/conference.sdf"); } // get the saved sessions for the phone List <int> savedSessions = new List <int>(); if (IsolatedStorageSettings.ApplicationSettings.Contains("FavouriteSessions")) { savedSessions = (List <int>)IsolatedStorageSettings.ApplicationSettings["FavouriteSessions"]; } if (dc.DatabaseExists()) { SavedSessions = dc.Sessions.Where(s => savedSessions.Contains(s.SessionId)).ToList(); } }
public EfConferenceMap(ConferenceDataContext context, IMapper mapper, MapperConfiguration config) { _context = context; _mapper = mapper; _config = config; }