Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using Microsoft.AspNetCore.Mvc.RazorPages;
- using System.Collections.Generic;
- using System.Linq;
- using UWofS.CS7;
- namespace NorthwindWeb.Pages
- {
- public class EmployeesModel : PageModel
- {
- public IEnumerable<string> EmployeeName { get; set; }
- public IEnumerable<string> Title { get; set; }
- public IEnumerable<string> Courtesy { get; set; }
- public IEnumerable<System.DateTime?> BirthDate { get; set; }
- public void OnGet()
- {
- ViewData["Title"] = "Northwind Web Site - Employees";
- EmployeeName = db.Employees.Select(s => s.FirstName + ' ' + s.LastName).ToArray();
- Title = db.Employees.Select(s => s.Title).ToArray();
- //Courtesy = db.Employees.Select(s => s.TitleOfCourtesy).ToArray();
- //BirthDate = db.Employees.Select(s => s.BirthDate).ToArray();
- }
- private Northwind db;
- public EmployeesModel(Northwind injectedContext)
- {
- db = injectedContext;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement