Enabled EF Core lazy loading.
This commit is contained in:
parent
840b59fcba
commit
56544938ac
@ -18,6 +18,7 @@
|
||||
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="5.0.5" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="5.0.5" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="5.0.5" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="5.0.8" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="5.0.5" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="5.0.5" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.5" />
|
||||
|
@ -25,8 +25,10 @@ namespace Props
|
||||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
services.AddDbContext<ApplicationDbContext>(options =>
|
||||
options.UseSqlite(
|
||||
Configuration.GetConnectionString("DefaultConnection")));
|
||||
{
|
||||
options.UseLazyLoadingProxies();
|
||||
options.UseSqlite(Configuration.GetConnectionString("DefaultConnection"));
|
||||
});
|
||||
|
||||
services.AddDatabaseDeveloperPageExceptionFilter();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user