diff --git a/Directory.Packages.props b/Directory.Packages.props index f61046dc7..96dc88c90 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -31,6 +31,7 @@ + diff --git a/src/Infrastructure/Data/ApplicationDbContext.cs b/src/Infrastructure/Data/ApplicationDbContext.cs index 580b3a633..d2da7304c 100644 --- a/src/Infrastructure/Data/ApplicationDbContext.cs +++ b/src/Infrastructure/Data/ApplicationDbContext.cs @@ -2,19 +2,17 @@ using CleanArchitecture.Application.Common.Interfaces; using CleanArchitecture.Domain.Entities; using CleanArchitecture.Infrastructure.Identity; +using GeneratedEntityFramework; using Microsoft.AspNetCore.Identity.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; namespace CleanArchitecture.Infrastructure.Data; -public class ApplicationDbContext : IdentityDbContext, IApplicationDbContext +[GeneratedDbContext] +public partial class ApplicationDbContext : IdentityDbContext, IApplicationDbContext { public ApplicationDbContext(DbContextOptions options) : base(options) { } - public DbSet TodoLists => Set(); - - public DbSet TodoItems => Set(); - protected override void OnModelCreating(ModelBuilder builder) { base.OnModelCreating(builder); diff --git a/src/Infrastructure/Infrastructure.csproj b/src/Infrastructure/Infrastructure.csproj index d3db63fd8..23bb19a88 100644 --- a/src/Infrastructure/Infrastructure.csproj +++ b/src/Infrastructure/Infrastructure.csproj @@ -28,6 +28,7 @@ +