How to access a child object using OData, WebAPI and a DTO?
问题 From a WebAPI controller, I am returning a list of ProjectEditorDTO objects from an OData request /odata/ProjectEditor?$format=json&$inlinecount=allpages&$top=10 : [Queryable] public virtual IHttpActionResult Get(ODataQueryOptions<Website> odataQueryOptions) { var userId = UserContext.Identity.UserId; try { var results = odataQueryOptions.ApplyTo(_uow.Repository<Website>() .Query() .Get() .Where(u => u.UserId == userId) .OrderBy(o => o.WebsiteName)).Cast<Website>() .Select(s => new