At the beginning, domain cannot be found in model class every time you add view. entities. product, you do not care about it. You can fill it in by hand. You can change it after the view is displayed. You can also find it by yourself.
Now the admincontroller part is used, and the list in the scaffold template is used, and the ghost will be killed, because if it cannot find the model, it will be gray to select the template.
I searched it everywhere and found that it was good to compile it. there are also funny foreigners who make up their minds to turn off VS and re-open it. But it is only suitable for some of them and not for me who are sad.
Build-rebuild-clean.
Simply download the source code of this book and compare the reference and using slightly. The result shows that it is quite different. the author also did not know to remind me that it was too unfriendly and he was in a hurry to become a book.
There are two aspects:
1. SportsStore. Domain-> Add reference
System. Runtime. Serialization
System. Web. Mvc
2. Change the using list of SportsStore. Domain. Entities. Product to the following:
Using System. ComponentModel. DataAnnotations;
Using System. Web. Mvc;
Sadly, even if these references are not available, the program can still run, but it cannot be displayed in scaffold... just... one is a headache, and I cannot find any place to explain how this list is obtained.
Excerpt from truthful information