Copy from Here
http://stackoverflow.com/questions/20976962/vs-2013-web-api-add-controller-dialogs-how-to-add-model-and-context-from-refer
0
|
Adding a controller in a Web API project works very well - only if your models and EF data context are in the same assembly as the project itself - i.e., located in the project's Models folder.
I created all the POCOs and EF data context in a separate library project, created the library, and referenced it from the Web API project. Unfortunately, the dialogs can only see models and data context whose .cs files reside in the project.
I've looked at similar questions and somehow, other people's add controller dialogs list their models and data contexts from external (referenced) libraries (then they have a different problem, which my problem isn't getting to (yet)).
Is there such a setting (in the IDE or web.config) that I need to specify so that these add controller dialogs will see my library's classes?
| ||
add comment |
0
|
So far, I've come up with a "dirty" workaround, which I'm not very satisfied, though it works:
|
Комментариев нет:
Отправить комментарий