c# - ODATA Separating the SERVICE from the DATA -
i have app 3 layers: a) service exposing web api odata b) business layer business logic , data access c) model
if use odata queries directly in service, accessing db context, works ok, issues is....how can achieve same, adding 1 layer in middle?
myservice web api 2
[enablequery] public iqueryable<individual> getindividuals() { individualbo bo = new individualbo(); return bo.getallindividuals(); }
my business layer
public iqueryable<individual> getallindividuals() { using (mycontext context = new mycontext()) { return context.individuals; } }
this not working......however if remove bo equation, works fine....any ideas?
Comments
Post a Comment