Exemplo n.º 1
0
        public void GetOneCustomer()
        {
            var customerId    = 3;
            var firstCustomer = _service.GetCustomerById(customerId);

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

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

            return(Ok(tmpCustomer));
        }