예제 #1
0
        public CreateModel(RazorPagesLesson.Models.StudentsContext context)
        {
            _context = context;

            GenderItems = Enum.GetValues(typeof(GenderType))
                          .Cast <GenderType>()
                          .Select(o => new SelectListItem
            {
                Value = ((int)o).ToString(),
                Text  = o.ToString()
            })
                          .ToList();
        }
예제 #2
0
 public DetailsModel(RazorPagesLesson.Models.StudentsContext context)
 {
     _context = context;
 }
예제 #3
0
 public IndexModel(RazorPagesLesson.Models.StudentsContext context)
 {
     _context = context;
 }