MVC 3 and strongly typed views

I'm having a few issues with the fact that you can properly configure the Add View dialog box. "Create a strongly typed view."

In most cases, I cannot display the model classes in the Model Class drop-down list. This last issue is related to the Entity Framework classes that were generated in the Model folder (and in the namespace). I am rebuilding the project and they are still not showing.

In fact, if I add a test class to the Model folder with several public properties - it does not appear in the drop-down list.

Is any information available on how this snapshot extends model classes for display to end users?

Hi,

+3
source share
2 answers

Typically, project recovery should be sufficient to show your own class. But, unfortunately, this is far from ideal. It happens to me. What I am doing is that I create a model of my view (and not an entity framework model), because you should only transfer view models to your views), copy the name to the clipboard and paste it into the Add View dialog box " I find it faster than scrolling down 1000 classes and finding the right one.

+2
source

This has never happened to me, but I know others who have had similar problems. Try this link , it may point you in the right direction

0

Source: https://habr.com/ru/post/1790210/


All Articles