Exemplo n.º 1
0
        public ActionResult <IEnumerable <DtoThirdParty> > Get()
        {
            List <DtoThirdParty> dtoThirdParties = null;

            try
            {
                dtoThirdParties = new List <DtoThirdParty>(thirdPartyService.GetDtoThirdParties());
            }
            catch (Exception ex)
            {
                var sb = new StringBuilder();
                sb.AppendLine($"Error message:{ex.Message}");
                sb.AppendLine($"Error stack trace:{ex.StackTrace}");
                logger.LogError(sb.ToString());
            }
            return(dtoThirdParties);
        }