Search code examples
asp.net-mvcscaffoldasp.net-mvc-scaffolding

Is it possible to scaffold multiple controllers in one command?


Using MvcScaffolding I can call these powershell commands to scaffold the Controllers and Views automagically.

scaffold Controller Products
scaffold Controller Reviews

Is it possible to combine the two commands into one? e.g

scaffold Controller Products, Reviews

Thanks


Solution

  • PM> $models="Products","Reviews"
    

    then to do it automa<T>ically,

    PM> foreach($m in $models) { Scaffold Controller $m }