예제 #1
0
        public void GetOneCustomer()
        {
            var customerId    = 3;
            var firstCustomer = _service.GetCustomerById(customerId);

            Assert.IsNotNull(firstCustomer);
        }
예제 #2
0
        public async Task <IActionResult> GetCustomer([FromRoute] int id)
        {
            var tmpCustomer = _service.GetCustomerById(id);

            if (tmpCustomer == null)
            {
                return(NotFound());
            }

            return(Ok(tmpCustomer));
        }