Exemplo n.º 1
0
        // GET api/Customers/5
        public Customer Get(int id)
        {
            CustomerContext dbContext = new CustomerContext();

            return(dbContext.Customers.Find(id));
        }
Exemplo n.º 2
0
        // GET api/Customers
        public IEnumerable <Customer> Get()
        {
            CustomerContext dbContext = new CustomerContext();

            return(dbContext.Customers.ToList());
        }