Some too-lengthy codes in one line can not be seen while practicing while watching this, please add source code under this or try to show the entire code on the screen(especially too-lengthy line codes).
when I run dotnet ef --startup-project ../TSHospital.Repositories/ migrations add Initial --context ApplicationDbContext --output-dir Migrations show this error Unable to create an object of type 'ApplicationDbContext'. For the different patterns supported at design time If I run it in Hospital.Repositories dotnet ef migrations add initial show this error Unable to create an object of type 'ApplicationDbContext'. For the different patterns supported at design time How to solve it please?
PM> Add-Migration Initial Build started... Build succeeded. An error occurred while accessing the Microsoft.Extensions.Hosting services. Continuing without the application service provider. Error: Some services are not able to be constructed (Error while validating the service descriptor 'ServiceType: Hospital.Utilities.IDbInitializer Lifetime: Scoped ImplementationType: Hospital.Utilities.DbInitializer': Unable to resolve service for type 'Hospital.Repositories.ApplicationDbContext' while attempting to activate 'Hospital.Utilities.DbInitializer'.) (Error while validating the service descriptor 'ServiceType: Hospital.Repositories.Interfaces.IUnitOfWork Lifetime: Transient ImplementationType: Hospital.Repositories.Implementation.UnitOfWork': Unable to resolve service for type 'Hospital.Repositories.ApplicationDbContext' while attempting to activate 'Hospital.Repositories.Implementation.UnitOfWork'.) More than one DbContext was found. Specify which one to use. Use the '-Context' parameter for PowerShell commands and the '--context' parameter for dotnet commands.
Hi, I am forced to say that since everyone is facing issues with userManager & roles table not getting populated, either reply with proper solution. Or else we will assume it to just a dummy demo, and not programming tutorial.
@@ASPNETMVCCORE I want to create a project for hospital management system according to my own settings. If you please, can we communicate privately so that we can discuss the project requirements, its cost, and the time required to establish it?