Skip to content

Commit 414c235

Browse files
author
Dhyan
committed
Till Video 111
1 parent 8d3159d commit 414c235

File tree

100 files changed

+5362
-111
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+5362
-111
lines changed

Bulky.DataAccess/Bulky.DataAccess.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
</PropertyGroup>
88

99
<ItemGroup>
10+
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="7.0.9" />
1011
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.9" />
1112
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.9" />
1213
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.9">

Bulky.DataAccess/Data/ApplicationDbContext.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
using Bulky.Model.Models;
22
using BulkyWeb.Models;
3+
using Microsoft.AspNetCore.Identity;
4+
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
35
using Microsoft.EntityFrameworkCore;
46

57
namespace BulkyWeb.Data
68
{
7-
public class ApplicationDbContext : DbContext
9+
public class ApplicationDbContext : IdentityDbContext<IdentityUser>
810
{
911
public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options) : base(options)
1012
{
@@ -15,6 +17,8 @@ public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options) : ba
1517

1618
protected override void OnModelCreating(ModelBuilder modelBuilder)
1719
{
20+
base.OnModelCreating(modelBuilder);
21+
1822
modelBuilder.Entity<Category>().HasData(
1923
new Category { Id = 1, Name = "Action", DisplayOrder = 1 },
2024
new Category { Id = 2, Name = "SciFi", DisplayOrder = 2 },

0 commit comments

Comments
 (0)