TJFrags
TJFrags
CC#
Created by TJFrags on 4/4/2023 in #help
❔ Update-Database causing error
Hi, When I try to use the "Update-Database" command in visual studio an error occures: An error occurred while accessing the Microsoft.Extensions.Hosting services. Continuing without the application service provider. Error: Failed to load configuration from file 'C:\Users\Pc\source\repos\GamersRisingWeb\GamersRising\appsettings.json'. Unable to create an object of type 'ApplicationDbContext'. For the different patterns supported at design time, see https://go.microsoft.com/fwlink/?linkid=851728 This started after changing a migration file but now I still get the error after changing it back. Is there a way to fix this without restarting?
25 replies
CC#
Created by TJFrags on 2/6/2023 in #help
❔ Database not being created
Hi, Im following this tutorial: https://www.youtube.com/watch?v=ogJTM1l2fl0&t=731s. In the video an sql server is started using SSMS, then the servers name is put into "appsettingss.json" server name = Revision-PC "DefaultConnection": "Server=(localdb)\mssqllocaldb;Database=Revision-PC;Trusted_Connection=True;MultipleActiveResultSets=true" My problem comes up when i try update-database command. The database is not created in SSMS. .NET 5 is used in the tutorial, could that be the issue?or am i missing somethimg.
2 replies
CC#
Created by TJFrags on 2/2/2023 in #help
❔ ASP.NET Core web app vs ASP.net web application(.NET Framework)
Hi, Ive been working with c# for a while now and would like to make a webapp but I dont know where to start. Should I use ASP.NET Core web app or ASP.net web application(.NET Framework) and whaat are the differences?
10 replies