c# - Exposing DataTransferObjects not Entities in WCF DataService -


i trying create wcf dataservice expose large set of data. data displayed in devexpress grid has built in support paging, sorting , querying on serverside. works absolutely fine if expose generated entities entity framework.

however expose datatransfer objects act sort of abstraction. can't find source of information on web ...

maybe of guys can me going right direction.

create dto class has property named id has [key] attribute. create class inheriting odatacontroller, controller. put method named get() on it:

    [enablequery]     public virtual iqueryable<mydto> get()     {     } 

in method return data iqueryable. after call entityset on dto in odata configuration.


Comments

Popular posts from this blog

sql - can we replace full join with union of left and right join? why not? -

javascript - Parallax scrolling and fixed footer code causing width issues -

iOS: Performance of reloading UIImage(name:...) -