WCF Data Contract and Reference Entity Data?

前端 未结 7 474
梦谈多话
梦谈多话 2021-02-04 10:24

Soliciting feedback/options/comments regarding a \"best\" pattern to use for reference data in my services.

What do I mean by reference data?

Let\'s use Northwin

7条回答
  •  盖世英雄少女心
    2021-02-04 11:11

    One other possibility is to treat the objects as property bags. Specify the properties you want when querying, and get back exactly the properties you need.

    Changing the properties to show in the "short" version then won't require multiple round trips, you can get all of the properties for a set at one time (avoiding chatty interfaces), and you don't have to modify your data or operation contracts if you decide you need different properties for the "short" version.

提交回复
热议问题