c# - Mapping IQueryable where clause from DTO to Entity -
i've got odata webapi method follows:
// get: odata/employees [enablequery] public iqueryable<dtos.employee> getemployees() { return this.attemptoperation(context => { iqueryable<dtos.employee> employees = context.employees.project().to<dtos.employee>(); return employees; }); }
it returns data to service if don't specify filter. add $filter=employeeid eq '1' url exception.
the exception aws dynamodb context library use performing linq queries against dynamodb. however, indicating context doesn't have table dtos.employee.
this of course obvious, context has entities, not dtos.
how can iqueryable clause specified client translate proper entity type?
for example, client needs query against dtos.employee.employeeid , needs translate clause against entities.employee.employeeid.
Comments
Post a Comment