Filling a DataSet or DataTable from a LINQ query result set

后端 未结 7 799
一个人的身影
一个人的身影 2020-12-01 02:38

How do you expose a LINQ query as an ASMX web service? Usually, from the business tier, I can return a typed DataSet or DataTable which can be seri

7条回答
  •  死守一世寂寞
    2020-12-01 03:13

    Make a set of Data Transfer Objects, a couple of mappers, and return that via the .asmx.
    You should never expose the database objects directly, as a change in the procedure schema will propagate to the web service consumer without you noticing it.

提交回复
热议问题