Naming Conventions For Partial Class Files

前端 未结 2 678
暗喜
暗喜 2020-12-02 07:50

I\'m generating the bulk of my ASP.NET MVC scaffolding code. All generated files are partial classes which use standard naming conventions. For example, my employee controll

2条回答
  •  没有蜡笔的小新
    2020-12-02 07:53

    I use . separation - for example EmployeeController.SomeSpecialBehaviour.cs. I also link it into the project tree via "dependentUpon" or whatever it is in the csproj, so that it nests under the file (in solution explorer) neatly. You have to do that by hand (edit the csproj) or with an addin, though; for example:

    
    
      Program.cs 
    
    

    appears as:

    • Subfolder
      • Program.cs
        • Program.Foo.cs

提交回复
热议问题