Created
March 16, 2017 23:45
-
-
Save A2H111/09c00ce3c12a5687a6510cb759b40c0f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CustomerController : ApiController | |
{ | |
//Creating dbcontext class for NorthwindDatabase | |
NorthwindEntities dbContext = new NorthwindEntities(); | |
[HttpGet] | |
public IHttpActionResult GetCustomer() | |
{ | |
//Here we will fetch the value from Customer Table | |
return Json(dbContext.Customers.Take(10).ToList()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment