Closed BurakCinar07 closed 2 years ago
Npgsql version update the reason for the change is older version there is an unimplemented method which throws exception.
Can you specifically
Insert operations throws MissingMethodException when I use Npgsql 4.1.3.1 version. Details:
An unhandled exception has occurred while executing the request.
System.MissingMethodException: Method not found: 'Npgsql.NpgsqlDataReader Npgsql.NpgsqlCommand.ExecuteReader()'.
at SqlSugar.AdoProvider.GetDataSetAll(String sql, SugarParameter[] parameters) in D:\repos\SqlSugar\Src\Asp.NetCore2\SqlSeverTest\SqlSugar\Abstract\AdoProvider\AdoProvider.cs:line 421
at SqlSugar.AdoProvider.GetDataTable(String sql, SugarParameter[] parameters) in D:\repos\SqlSugar\Src\Asp.NetCore2\SqlSeverTest\SqlSugar\Abstract\AdoProvider\AdoProvider.cs:line 1080
at SqlSugar.QueryableProvider1.ToDataTable() in D:\repos\SqlSugar\Src\Asp.NetCore2\SqlSeverTest\SqlSugar\Abstract\QueryableProvider\QueryableProvider.cs:line 1167 at SqlSugar.InsertableProvider
1.GetDiffTableBySql(Nullable1 identity) in D:\repos\SqlSugar\Src\Asp.NetCore2\SqlSeverTest\SqlSugar\Abstract\InsertableProvider\InsertableProvider.cs:line 867 at SqlSugar.InsertableProvider
1.GetDiffTable(String sql, Nullable1 identity) in D:\repos\SqlSugar\Src\Asp.NetCore2\SqlSeverTest\SqlSugar\Abstract\InsertableProvider\InsertableProvider.cs:line 794 at SqlSugar.InsertableProvider
1.After(String sql, Nullable1 result) in D:\repos\SqlSugar\Src\Asp.NetCore2\SqlSeverTest\SqlSugar\Abstract\InsertableProvider\InsertableProvider.cs:line 759 at SqlSugar.PostgreSQLInserttable
1.ExecuteReturnIdentityAsync() in D:\repos\SqlSugar\Src\Asp.NetCore2\SqlSeverTest\SqlSugar\Realization\PostgreSQL\Insertable\PostgreSQLInserttable.cs:line 30
Have a DEMO?
The exception was caused by another library that uses Npgsql version 6.0.2 version.
To reproduce error Npgsql.EntityFrameworkCore.PostgreSQL package can be added to project and changing Npgsql version at SqlSugar.csproj to 4.1.3.1. Insert query also needs to have EnableDiffLogEvent.
I sent you a demo via email.
Npgsql can be installed independently in Nuget , sqlsugar The built-in ones don't need to be upgraded
You can reference sqlsugar. DLL and nuget to install Npgsql Version 6.0.2 version
Changes mostly focused on audit feature.