You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there, there is a problem with FreelanceBlogContextSeedData.cs. When I launch the code, I get this error in that class :
System.ObjectDisposedException: 'Cannot access a disposed object. A common cause of this error is disposing a context that was resolved from dependency injection and then later trying to use the same context instance elsewhere in your application. This may occur if you are calling Dispose() on the context, or wrapping the context in a using statement. If you are using dependency injection, you should let the dependency injection container take care of disposing context instances.
Object name: 'FreelancerBlogContext'.'
HERE IS A RELATED IMAGE
The text was updated successfully, but these errors were encountered:
You should add .Wait() to SeedAdminUser method in Startup->Configure and change return type of SeedAdminUser method from void to Task. seeder.SeedAdminUser().Wait();
Hi there, there is a problem with FreelanceBlogContextSeedData.cs. When I launch the code, I get this error in that class :
System.ObjectDisposedException: 'Cannot access a disposed object. A common cause of this error is disposing a context that was resolved from dependency injection and then later trying to use the same context instance elsewhere in your application. This may occur if you are calling Dispose() on the context, or wrapping the context in a using statement. If you are using dependency injection, you should let the dependency injection container take care of disposing context instances.
Object name: 'FreelancerBlogContext'.'
HERE IS A RELATED IMAGE
The text was updated successfully, but these errors were encountered: