Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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