示例#1
0
 public void WriteWsCatch(WsCatch c)
 {
     using (var connection = new System.Data.SqlClient.SqlConnection(_configuration.GetConnectionString("OnlyLoggingAuthorizedConnection")))
     {
         var sqlcommand = new System.Data.SqlClient.SqlCommand(queryInsert, connection);
         sqlcommand.Parameters.AddWithValue("@request_value", c.Request);
         sqlcommand.Parameters.AddWithValue("@response_value", c.Response);
         sqlcommand.Parameters.AddWithValue("@type_code", c.type);
         sqlcommand.Parameters.AddWithValue("@linked_id", c.linked_id);
         lastLoggedId = (int)sqlcommand.ExecuteScalar();
     }
 }
 public WsSoapWrapper(IConfiguration configuration)
 {
     Client    = new CalculatorSoapClient(CalculatorSoapClient.EndpointConfiguration.CalculatorSoap);
     SoapCatch = new WsCatch()
     {
         type = Service_Type.Soap
     };
     RestCatch = new WsCatch()
     {
         type = Service_Type.Rest
     };
     _configuration = configuration;
 }