2020-04-10 18:15:11 +08:00
|
|
|
|
using FAuth.DataBase.Tables;
|
2020-03-30 10:12:52 +08:00
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
|
|
|
|
|
namespace FAuth.DataBase
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 数据库
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class FAuthDb:DbContext
|
|
|
|
|
{
|
2020-04-10 18:15:11 +08:00
|
|
|
|
public FAuthDb(DbContextOptions options) : base(options) {
|
|
|
|
|
Database.EnsureCreatedAsync().Wait();
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 用户表
|
|
|
|
|
/// </summary>
|
|
|
|
|
public DbSet<FUser> Users { get; set; }
|
2020-03-30 10:12:52 +08:00
|
|
|
|
}
|
|
|
|
|
}
|