Telerik MVC Grid with Ajax Binding using EntityObjects gets Circular References exception

前端 未结 4 750
说谎
说谎 2021-02-06 15:48

I have been using Telerik MVC Grid for quite a while now and It is a great control, however, one annoying thing keeps showing up related to using the grid with Ajax Binding to o

4条回答
  •  余生分开走
    2021-02-06 16:03

    Another good pattern is to simply not avoid creating a ViewModel from the Model. It is a good pattern to include a ViewModel. It gives you the opportunity to make last minute UI related tweaks to the model. For example, you can tweak a bool to have an associated string Y or N to help make the UI look nice, or vice versa. Sometimes the ViewModel is exactly like the Model and the code to copy the properties seems unnecessary, but the pattern is a good one and sticking to it is the best practice.

提交回复
热议问题