none
Using MVC6 and scaffolding changes the order of fields entered in the model

    Question

  • I've created an MVC6 web application and am having a problem with scaffolding changing the order of fields in the model classes. I have several fields in some files and want them presented in the order I specified them in the model c#. They are being created alphabetically in the cshmtl scaffold files.  It's probably something simple but I can't seem to find it. Thanks in advance for any help.

    Vern Miller

    Friday, May 13, 2016 11:41 PM

Answers

  • Hi VernMiller,

    This forum is discuss Visual Studio WPF/SL Designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System, and Visual Studio Editor.

    Since your problem is related to MVC, I suggest you post your problem to ASP.NET MVC forum for a better help. Thanks for your understanding.

    Best Regards,
    Weiwei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by VernMiller Monday, May 16, 2016 1:17 PM
    Monday, May 16, 2016 8:13 AM
    Moderator

All replies

  • Hi VernMiller,

    This forum is discuss Visual Studio WPF/SL Designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System, and Visual Studio Editor.

    Since your problem is related to MVC, I suggest you post your problem to ASP.NET MVC forum for a better help. Thanks for your understanding.

    Best Regards,
    Weiwei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by VernMiller Monday, May 16, 2016 1:17 PM
    Monday, May 16, 2016 8:13 AM
    Moderator
  • Thanks and I found it in your suggested forum.  Simply add [ColumnOrder(1)] etc.

    Vern Miller

    Monday, May 16, 2016 1:17 PM