prasanna p

prasanna p

  • 1.2k
  • 474
  • 106.7k

how to use Microsoft.Data.SqlClient in the .netcoreapp 2.1

Jan 30 2025 12:45 PM

Hi Friends,

The data insertion in the sql database taking long time from the .net core application, I like to use Microsoft.Data.SqlClient

I used the following code

 

               using (SqlConnection connection = new SqlConnection(@"Server=WIN-KOQSELR3408\SQLEXPRESS;Database=Test;User Id=sa;Password=9229"))
               {
                  connection.Open();
               }
           
            The connection is not working ad it is throwing exception The type initializer for 'Microsoft.Data.SqlClient.SqlAuthenticationProviderManager' threw an exception

Please tell me how to resolve the issue?

 


Answers (3)