public int PostException(ProjectExceptionEntities generatedException) { IProjectExceptionOperations exceptionOperations = new ProjectExceptionOperations(); ProjectException exceptionToInsert = MapEntities.Map <ProjectExceptionEntities, ProjectException>(generatedException); exceptionOperations.LogException(exceptionToInsert); return(exceptionToInsert.Id); }
public static void LogExceptionFromApplication(ProjectExceptionEntities exception) { IProjectExceptionOperations projectExceptionOperation = new ProjectExceptionOperations(); ProjectException generatedException = new ProjectException(); generatedException.CreatedDate = DateTime.Now; generatedException.Message = exception.Message; generatedException.ProjectType = Convert.ToString(ProjectTypeEnum.ServiceLayer); generatedException.StackTrace = exception.StackTrace; projectExceptionOperation.LogException(generatedException); }
public static void LogException(Exception exception) { ServiceInputObject inputObject = new ServiceInputObject { baseURL = ConfigSettings.WebApiBaseAddress, controllerName = "ProjectException", methodName = "PostException" }; ProjectExceptionEntities generatedException = new ProjectExceptionEntities(); generatedException.CreatedDate = DateTime.Now; generatedException.Message = exception.Message; generatedException.ProjectType = Convert.ToString(ProjectTypeEnum.ServiceLayer); generatedException.StackTrace = exception.StackTrace; ServiceMethods.GeneratePostRequestWithIntDestinationEntity <ProjectExceptionEntities>(generatedException, inputObject); }