Exemplo n.º 1
0
 public CustomerInfo GetCustomerInfo(GetCustomerInfoRequest request)
 {
     try
     {
         var customer = _customersDA.GetCustomerInfo(request.C_ID);
         return(customer);
     }
     catch (Exception ex)
     {
         throw;
     }
 }
Exemplo n.º 2
0
        public IActionResult TestConnection(int ID)
        {
            var request = new GetCustomerInfoRequest()
            {
                C_ID = ID
            };
            var customer = _customerService.GetCustomerInfo(request);

            if (customer == null)
            {
                return(BadRequest("Invalid credentials"));
            }
            return(Ok(customer));
        }