Simple way to return anonymous types (to make MVC using LINQ possible)

后端 未结 6 2004
囚心锁ツ
囚心锁ツ 2021-01-05 19:03

I\'d like to implement MVC while using LINQ (specifically, LINQ-to-entities). The way I would do this is have the Controller generate (or call something which generates) th

6条回答
  •  灰色年华
    2021-01-05 19:18

    You can easily convert anonymous types into dynamic objects, here is the simple implementation of Donymous objects (Dynamic anonymous objects) that can populate from Anonymous object or DataReader.

提交回复
热议问题