Пример #1
0
 public HttpResponseMessage Get(long?customerId, string email)
 {
     if (CustomerValidator.IsValidationRules(customerId, email, out errorMessage))
     {
         logger.Info("Inquery with Customer Id :" + customerId + " and Email address : " + email);
         var customer = _customerService.GetCustomer(customerId, email);
         if (customer != null)
         {
             return(Request.CreateResponse(HttpStatusCode.OK, customer));
         }
         logger.Info("No Customer Found.");
         return(Request.CreateErrorResponse(HttpStatusCode.NotFound, "Not Found"));
     }
     else
     {
         logger.Trace(errorMessage);
         return(Request.CreateErrorResponse(HttpStatusCode.NotAcceptable, errorMessage));
     }
 }