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

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

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