Beispiel #1
0
        // GET api/Customers/5
        public Customer Get(int id)
        {
            CustomerContext dbContext = new CustomerContext();

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

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