Quickest way to get Scaffold code created with C#/

2019-03-09 23:38发布

问题:

At the start of any project, once you've got your object model there then comes a period of tedium as you crank out the skeleton code required.

Are there any tools that will help me with this task (including unit test skeletons if possible), a bit like the scaffolding feature in Rails?

Thanks.

回答1:

It really depends on the framework stack that you're using:

  • Scaffolding for Monorail + ActiveRecord
  • ASP.NET MVC + Linq to SQL
  • Web forms + dynamic data
  • ASP.NET MVC + Subsonic

Other that than, you could always code your own "scaffolding" using CodeSmith or MyGeneration

Also see this related question