开发者

How to get MvcScaffold to work with external models?

开发者 https://www.devze.com 2023-02-11 10:44 出处:网络
Steve Sanderson has a great blog that goes into the details of MvcScaffolding.See it here http://blog.stevensanderson.com/2011/01/13/mvcscaffolding-standard-usage/

Steve Sanderson has a great blog that goes into the details of MvcScaffolding. See it here http://blog.stevensanderson.com/2011/01/13/mvcscaffolding-standard-usage/

He also has a great video on http://channel9.msdn.com/Series/mvcConf/mv开发者_高级运维cConf-2-Steve-Sanderson-MvcScaffolding

In his blog he mentions…. ModelType : By default we try to infer this from the controller name, but if you want your controllers and models to have totally unrelated names, you can specify a particular model type using this parameter. We’ll find any model class defined in your project or another project it references, but not in any external assembly.

Our ViewModels are kept in a separate project in the same solution. However we are Referencing the DLL so Get-ProjectType –ModelType ourVM –Project OurProject does not find the model.

No problem it is an open source project. I will down the code and tweek Get-ProjectType.

I am unable to find where Get-ProjectType is defined in PowerShell. (resolved)


We used MvcScaffold to create custom Scaffolders ( see steve sanderson video during MvcConf 2). Then our custom scaffolder called our custom powershell scripts to do the work.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号