System.InvalidOperationException: A second operation was started on this context before a previous operation completed.

 

DbContext 직접 주입 대신에 DbFactory 주입해서 사용하자.

 

[Inject]
public ApplicationDbContext _AppDbContenxt { get; set; }

// - 에서 - 

[Inject]
public IDbContextFactory<ApplicationDbContext> DbFactory { get; set; }

// - 으로 -

 

EFCore(Entity Framework Core)를 사용한 ASP.NET Core Blazor Server

 

 

 

Comments


Comments are closed