I have a question to ask about the SQL Server, Visual Studio and the Entity Framework and how it can update the Model-view with the use of @HTML.DisplayFor<>()
.
Currently everything is set up as it should be:
- DbContext is good (Primary key is setup, alongside OnModelCreate(ModelBuilder modelBuilder))
- SQL Server (local) is good
- Migrations is good (and is showing up in SQL Server in VS2022)
... So pretty much the IIS Server is able to show my ASP.NET Core web-app without any debug/error information. It just won't show my elements in a DisplayFor<>()
.
My team and I are kind of perplexed, can someone please help us out? Thank you in advance.
CodePudding user response:
I solved it!
I wasn't updating the Controller which was controlling the:
[HttpGet(IndexExample.cshtml)]
public IActionResult GetIndex()
{
var model = new IndexModel {
IndexSubclassGetSetSyntacticSugared = new IndexModel.IndexSubclass()
};
return View(model);
}