I'm starting in ASP.NET MVC, following tutorials and handouts on the internet I created a study project and I have some doubts.
Well, first I created a following class structure:
> Acesso -> Possui informações de identificacao(Login e Senha)
> Nivel_Acesso -> Define o nível de acesso de um determinado "ACESSO"
> Cliente -> Guarda os dados do cliente e possui Acesso e Endereco
> Endereco -> Armazena Endereco do cliente
I created a class of type Context that maps all these entities, as well as a controler responsible for the login and the view of this controler. The problem is exactly in this Login view, because when I try to declare the model at the top of the document "Login.cshtml" the model seems not to be "viewed" from the view. I say this because when I insert the line - > @Model "ProjectName (FINAL POINT)" it does not display the project directories.
And when I try to access some template property, it looks like the object is empty.
Follow the screen:
The other question concerns the entity-framework, as it seems to have worked normally when creating the database for the first time, however I ended up dropping the DB. Now when the project starts, the database is not created again by the entity-framework. I even tried to create a Migration and give Update-Database, but it had no effect on the database.