summaryrefslogtreecommitdiffstats
path: root/src/Pages/App/ReservationForm.cshtml.cs
blob: e509a46bf32be90b32558a44a4b92c28a3ed0070 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
using System.Collections.Generic;
using System.Linq;
using IOL.Fagprove.Data;
using IOL.Fagprove.Data.Models;
using Microsoft.AspNetCore.Mvc.RazorPages;

namespace IOL.Fagprove.Pages.App
{
    public class ReservationForm : PageModel
    {
        public List<ReservationObject> Cabins { get; set; }
        private readonly AppDbContext _context;

        public ReservationForm(AppDbContext context)
        {
            _context = context;
        }
        
        public void OnGet()
        {
            Cabins = _context.Cabins.ToList();
        }
    }
}