progress
This commit is contained in:
parent
2c1b0404a6
commit
7fc7464e13
11
DbContext.cs
Normal file
11
DbContext.cs
Normal file
@ -0,0 +1,11 @@
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Sequence.Entities;
|
||||
|
||||
public class DbContext : IdentityDbContext<User, IdentityRole<Guid>, Guid>
|
||||
{
|
||||
public DbContext(DbContextOptions<DbContext> options) : base(options) { }
|
||||
|
||||
public DbSet<Card> Cards { get; set; }
|
||||
}
|
8
Entities/Card.cs
Normal file
8
Entities/Card.cs
Normal file
@ -0,0 +1,8 @@
|
||||
namespace Sequence.Entities;
|
||||
|
||||
public class Card
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Suit Suit { get; set; }
|
||||
public string Value { get; set; }
|
||||
}
|
8
Entities/User.cs
Normal file
8
Entities/User.cs
Normal file
@ -0,0 +1,8 @@
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
|
||||
namespace Sequence.Entities;
|
||||
|
||||
public class User : IdentityUser<Guid>
|
||||
{
|
||||
public string Name { get; set; }
|
||||
}
|
@ -6,4 +6,14 @@
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="7.0.4" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="7.0.4" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.4">
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="7.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
Loading…
x
Reference in New Issue
Block a user