Skip to content

Instantly share code, notes, and snippets.

@aarshtalati
Created December 30, 2016 18:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aarshtalati/270d630ba2e8421d020eb1149abaf346 to your computer and use it in GitHub Desktop.
Save aarshtalati/270d630ba2e8421d020eb1149abaf346 to your computer and use it in GitHub Desktop.
Web API Controller listening to AngularJS HTTP GET calls
public class CustomerController : _ApiBaseController
{
// GET: api/Customer
public IEnumerable<CustomerContract> Get()
{
var customers = repository.EntitySet<NorthwindEntities.DB.Customer>().Take(10).ToArray();
return new List<CustomerContract>().AsEnumerable();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment