I've seen examples where you can setup the value of the model but my question is I have a DB with data I want to pass to my web api. I know how it gets pulled from a controller.
Controller
var categorypatents = db.CategoryPatents.Include(c => c.Category).Include(c => c.Patent);
return View(categorypatents.ToList());
So inside of my web api how would I accomplish this? I know how to set the varibles if I'm defining them in my controller.
MasterV23
Member
113 Points
318 Posts
Setting up web api to pull data from a database using EF.
Apr 13, 2012 03:16 PM|LINK
I've seen examples where you can setup the value of the model but my question is I have a DB with data I want to pass to my web api. I know how it gets pulled from a controller.
Controller
So inside of my web api how would I accomplish this? I know how to set the varibles if I'm defining them in my controller.