asp.net web api - Is there a way to represent summary rows with OData? -
i'm trying tack on additional information list of items returned odatacontroller
's method. use case summary rows. want return rows of report , additional info totals, sub-totals, etc.
so, starting method:
public pageresult<myreportline> get(odataqueryoptions odataqueryoptions)
i tried wrapping myreportline
in myreport
public class myreport { ienumerable<myreportline> _myreportlines; mysummaryrow _mysummaryrow; }
and returning myreport
object.
public pageresult<myreport> get(odataqueryoptions odataqueryoptions)
this approach seemed mess querying mechanisms because query supplied in uri targeting myreportline
, myreport
actual class that's exposed. don't think wrapper/summary should first-class entity...
is there recommended approach task?
you should use odataqueryoptions i.e
public pageresult<myreport> get(odataqueryoptions<myreportline> odataqueryoptions)
Comments
Post a Comment