문제

Wondering if it's considered best practice to use Strongly typed views in only your Edit forms, or should they be used in create forms as well.

I know it most likely depends, but just haven't found a good resource yet outlining best practices with regards to using ViewModels.

도움이 되었습니까?

해결책

Best Practise in my opinion is to have one type/view for both edit and create, because in most cases what you have entered in the first place need to have ability to edit it later, so the best to have one view/type that do edit/create with may be small UI changes in case of create or edit such as disabiling some fields that only editable at create stage , etc

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top