阅读背景:

Asp.net mvc重建ViewModel的最佳做法是什么?

来源:互联网 

On POST , if validation failed and before sending back the ViewModel to the same View with Model State errors, do you rebuild ViewModel for all SelectLists, ReadOnly fields etc? right now I have separate methods for Fill First Time(for GET Edit-Method) / Rebuild ViewModels from domain objects, what is the best practice so I can be DRY and also not have to change two methods any time I add a new readonly property to ViewModel?On POST , if validation failed and before sendi




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: