使用MvcScaffolding
我可以调用这些powershell命令来自动搭建控制器和视图。
scaffold Controller Products
scaffold Controller Reviews
是否可以将两个命令合并为一个? e.g
scaffold Controller Products, Reviews
由于
答案 0 :(得分:4)
PM> $models="Products","Reviews"
然后执行automa<T>ically
,
PM> foreach($m in $models) { Scaffold Controller $m }
答案 1 :(得分:2)
您可以在一行中使用多个脚手架命令
Scaffold Controller Products; Scaffold Controller Reviews