//ctor public EventViewModel() { _saveChangesCommand = new RelayCommand( OnSaveChanges ); _context = ContextFactory.GetEventContext(); _teamContext = ContextFactory.GetTeamContext(); _eventTeamContext = ContextFactory.GetEventTeamContext(); WebContext.Current.Authentication.LoggedIn += ( s, e ) => UpdateForUsersRole(); WebContext.Current.Authentication.LoggedOut += ( s, e ) => UpdateForUsersRole(); UpdateForUsersRole(); LoadTeams(); }
public static EventTeamContext GetEventTeamContext() { return _eventTeamContext ?? (_eventTeamContext = new EventTeamContext()); }