Beispiel #1
0
        public async Task <IHttpActionResult> GetLeadDetailed(DetailedLeadGet inputObject)
        {
            //UserGuid = GetUserGuidFromHttpContextBase(_httpContextBase);
            //if (UserGuid == Guid.Empty) return new HttpActionResult(HttpStatusCode.Unauthorized, "User Validation Error");

            //Log the request
            var logCommand = new LogCommand
            {
                User            = User,
                LoggingInstance = _loggingInstance,
                LogMessage      = $"LeadController.GetLeadDetailed Starting input parameter CustomerGuid = {inputObject.CustomerGuid}"
            };

            _logHandler.HandleLog(logCommand);

            //Await the response
            var results = await _leadService.GetLeadDetailed(inputObject.CustomerGuid, logCommand);

            //Log the response
            logCommand.LogMessage =
                $"LeadController.GetLead completed. Output value = {JsonConvert.SerializeObject(results.Entity)}";
            _logHandler.HandleLog(logCommand);

            //Return the results
            return(ReturnFormattedResults(results));
        }