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

c# SetCompatibleTextRenderingDefault must be called before the first -

c++ - Fill runtime data at compile time with templates -

C#.NET Oracle.ManagedDataAccess ConfigSchema.xsd -