forked from Sarah/Lieb-Website
Created database
This commit is contained in:
parent
e068536abe
commit
eec8e419ba
19 changed files with 618 additions and 4 deletions
30
Lieb/Pages/Users/Index.cshtml.cs
Normal file
30
Lieb/Pages/Users/Index.cshtml.cs
Normal file
|
@ -0,0 +1,30 @@
|
|||
#nullable disable
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Lieb.Data;
|
||||
using Lieb.Models;
|
||||
|
||||
namespace Lieb.Pages.Users
|
||||
{
|
||||
public class IndexModel : PageModel
|
||||
{
|
||||
private readonly Lieb.Data.LiebContext _context;
|
||||
|
||||
public IndexModel(Lieb.Data.LiebContext context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
|
||||
public IList<User> User { get;set; }
|
||||
|
||||
public async Task OnGetAsync()
|
||||
{
|
||||
User = await _context.Users.ToListAsync();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue