There you have the issue. PureLive the models are generated in a dynamic in-memory assembly. That means you won't be able to compile any C# code using them. Because it does not exist at compile time. If you use any of the other modes, the models will be build and can be available in your solution.
With App_Data mode, I always put it in an other folder and then include them in the product.
If you use Dll, you need to reference the DLL in your solution.
Doing so will allow you to use the models in your (Api)Controllers.
Modelsbuilder in UmbracoApiController?
Hi there,
anyone know if it is possible to use Modelsbuilder with the UmbracoApiController? And if so, how to do it? I can´t seem to gain access to the models.
Best regards René
Yes you are. How are you using the models? I mean, Dll, App_Data, ... ?
Hi mr. Magician,
i´m using them in dll in development and PureLive in live.
/R
There you have the issue. PureLive the models are generated in a dynamic in-memory assembly. That means you won't be able to compile any C# code using them. Because it does not exist at compile time. If you use any of the other modes, the models will be build and can be available in your solution.
Doing so will allow you to use the models in your (Api)Controllers.
Kind regards
Damiaan
Hi Damiaan,
thanks for solving this mystery for me :-).
Best regards René
Glad I could help. :-)
The only thing which I need to do now, is to practice some magic... And submit a proposal talk for next year... ;-)
is working on a reply...