public AccountController(LunarSportsDBContext context, UserManager <ApplicationUser> userManager, SignInManager <ApplicationUser> signInManager, RoleManager <IdentityRole> roleManager) { this._context = context; this.userManager = userManager; this.signInManager = signInManager; this.roleManager = roleManager; }
public EventScheduleEntryViewModel(EventScheduleEntry dbModel) { this.Dbmodel = dbModel; var dbLoc = LunarSportsDBContext.getInstance().EventLocations.Where(el => el.ID == this.Dbmodel.LocationID).FirstOrDefault(); this.Location = new EventLocationViewModel(dbLoc); }
public MenuComponent(LunarSportsDBContext context) { _context = context; this.menuEntries = new LinkedList <MenuEntry>(); this.menuEntries.AddLast(new MenuEntry { Controller = "Home", Action = "Index", DisplayName = "Admin home" }); this.menuEntries.AddLast(new MenuEntry { Controller = "ApplicationRoles", Action = "Index", DisplayName = "Manage roles" }); this.menuEntries.AddLast(new MenuEntry { Controller = "User", Action = "Index", DisplayName = "Manage users" }); this.menuEntries.AddLast(new MenuEntry { Controller = "EventLocationContactDetails", Action = "Index", DisplayName = "Manage contact details" }); this.menuEntries.AddLast(new MenuEntry { Controller = "EventLocations", Action = "Index", DisplayName = "Manage locations" }); this.menuEntries.AddLast(new MenuEntry { Controller = "Events", Action = "Index", DisplayName = "Manage events" }); this.menuEntries.AddLast(new MenuEntry { Controller = "EventTypes", Action = "Index", DisplayName = "Manage event types" }); this.menuEntries.AddLast(new MenuEntry { Controller = "LaunchSites", Action = "Index", DisplayName = "Manage Launch sites" }); this.menuEntries.AddLast(new MenuEntry { Controller = "Pages", Action = "Index", DisplayName = "Manage pages" }); }
public EventListViewModel(Event dbmodel) { this.Dbmodel = dbmodel; this.LaunchSite = new LaunchSiteViewModel(LunarSportsDBContext.getInstance().LaunchSites.Where(ls => this.Dbmodel.LaunchSiteID == ls.ID).FirstOrDefault()); }
public EventsController(LunarSportsDBContext context) { _context = context; }
public LaunchSitesController(LunarSportsDBContext context) { _context = context; }
//Event Schedule entries -> as a list public EventDetailsViewModel(Event dbmodel) : base(dbmodel) { this.ScheduleEntries = LunarSportsDBContext.getInstance() .EventScheduleEntries.Where(ese => ese.EventID == this.Dbmodel.ID) .Select(ese => new EventScheduleEntryViewModel(ese)).ToList(); }
public PagesController(LunarSportsDBContext ctx) { this._context = ctx; }
public EventLocationViewModel(EventLocation dbmodel) { this.Dbmodel = dbmodel; this.Contact = LunarSportsDBContext.getInstance(). EventLocationContactDetails.Where(elcd => elcd.ID == this.Dbmodel.ContactDetail).FirstOrDefault(); }
public PagesController(LunarSportsDBContext context) { _context = context; }
public LaunchSiteViewModel(LaunchSite dbmodel) { this.Dbmodel = dbmodel; this.Location = LunarSportsDBContext.getInstance().EventLocations.Where(loc => this.Dbmodel.Location == loc.ID).FirstOrDefault(); this.Contact = LunarSportsDBContext.getInstance().EventLocationContactDetails.Where(c => c.ID == this.Location.ContactDetail).FirstOrDefault(); }
public UserController(UserManager <ApplicationUser> userManagerr, LunarSportsDBContext ctx, RoleManager <IdentityRole> rm) { this.userManager = userManagerr; this.roleManager = rm; this._context = ctx; }
public LunarSportsDBContext(DbContextOptions <LunarSportsDBContext> opts) : base(opts) { LunarSportsDBContext.instance = this; }
public EditUserModel(ApplicationUser au) { this._context = LunarSportsDBContext.getInstance(); this.SetApplicationUserDetails(au); this.GetAdditionalUserDetails(); }
public static LaunchSite LaunchSiteFromDb(int id) { var site = LunarSportsDBContext.getInstance().LaunchSites.Where(ls => ls.ID == id).FirstOrDefault(); return(site); }
public DefaultController(LunarSportsDBContext context) { this._context = context; }
public EventLocationContactDetailsController(LunarSportsDBContext context) { _context = context; }