This commit is contained in:
454313500@qq.com
2021-03-25 20:44:12 +08:00
parent 06c32afa03
commit c62389a7c0
14 changed files with 1083 additions and 21 deletions

View File

@@ -13,6 +13,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="5.0.4" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.4" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.4">
<PrivateAssets>all</PrivateAssets>

View File

@@ -1,13 +1,15 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using System;
namespace CC.Yi.Model
{
public partial class DataContext : DbContext
public partial class DataContext : IdentityDbContext
{
public DataContext(DbContextOptions<DataContext> options) : base(options)
{
}
public DbSet<result_user> result_user { get; set; }
}
}

View File

@@ -2,10 +2,11 @@
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
namespace CC.Yi.Model
{
public partial class DataContext :DbContext
public partial class DataContext :IdentityDbContext
{
public DbSet<student> student { get; set; }
}

View File

@@ -17,10 +17,11 @@ using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
namespace CC.Yi.Model
{
public partial class DataContext :DbContext
public partial class DataContext :IdentityDbContext
{
<# foreach(string k in ModelData){
#>

View File

@@ -0,0 +1,13 @@
using Microsoft.AspNetCore.Identity;
using System;
using System.Collections.Generic;
using System.Text;
namespace CC.Yi.Model
{
public class result_user : IdentityUser
{
//你可以在这里添加你额外需要的字段例如
//public int level { get; set; }
}
}