开发者

How to get MvcScaffold to work with external models?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜