Пример #1
0
        private static bool WriteExceptionToDatabase(DataContracts.LogixLogException payLoad)
        {
            using (IQueryRepository <DataContracts.LogixLogException> repository = new QueryRepository <DataContracts.LogixLogException>(ConnectionString))
            {
                payLoad.IsLoggedFromMsmq = false;

                ICollection <NameValueType> nameValuePair = new System.Collections.ObjectModel.Collection <NameValueType>
                {
                    new NameValueType
                    {
                        Name          = USP_InsertExceptionLogs_ParamName_Udtt_LogixLogException,
                        Value         = payLoad,
                        TableTypeName = Udtt_Name_LogixLogException,
                        IsTableType   = true
                    },
                    new NameValueType
                    {
                        Name          = USP_InsertExceptionLogs_ParamName_Udtt_LogixLogError,
                        Value         = payLoad.UserErrorInfo,
                        TableTypeName = Udtt_Name_LogixLogError,
                        IsTableType   = true
                    }
                };

                return(repository.InsertOrUpdate(USP_InsertExceptionLogs_Name, nameValuePair));
            }
        }