Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump Dapper from 2.0.151 to 2.1.4 #102

Merged
merged 2 commits into from
Oct 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/Repositories/MsSql/src/BaseMsSqlRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ protected async Task<int> ExecuteAsync(string sql, object? param = null)
/// <param name="sql"></param>
/// <param name="param"></param>
/// <returns></returns>
protected async Task<T> ExecuteScalarAsync<T>(string sql, object? param = null)
protected async Task<T?> ExecuteScalarAsync<T>(string sql, object? param = null)
{
using var conn = GetWriteConnection();
return await conn.ExecuteScalarAsync<T>(sql, param);
Expand All @@ -44,7 +44,7 @@ protected async Task<T> ExecuteScalarAsync<T>(string sql, object? param = null)
/// <param name="sql"></param>
/// <param name="param"></param>
/// <returns></returns>
protected async Task<T> QueryScalarValueAsync<T>(string sql, object? param = null)
protected async Task<T?> QueryScalarValueAsync<T>(string sql, object? param = null)
{
using var conn = GetReadConnection();
return await conn.ExecuteScalarAsync<T>(sql, param);
Expand All @@ -57,7 +57,7 @@ protected async Task<T> QueryScalarValueAsync<T>(string sql, object? param = nul
/// <param name="sql"></param>
/// <param name="param"></param>
/// <returns></returns>
protected async Task<T> QueryFirstAsync<T>(string sql, object? param = null)
protected async Task<T?> QueryFirstAsync<T>(string sql, object? param = null)
{
using var conn = GetReadConnection();
return await conn.QueryFirstOrDefaultAsync<T>(sql, param);
Expand All @@ -70,7 +70,7 @@ protected async Task<T> QueryFirstAsync<T>(string sql, object? param = null)
/// <param name="sql"></param>
/// <param name="param"></param>
/// <returns></returns>
protected async Task<T> QuerySingleAsync<T>(string sql, object? param = null)
protected async Task<T?> QuerySingleAsync<T>(string sql, object? param = null)
{
using var conn = GetReadConnection();
return await conn.QuerySingleOrDefaultAsync<T>(sql, param);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Dapper" Version="2.0.151" />
<PackageReference Include="Dapper" Version="2.1.4" />
<PackageReference Include="System.Data.SqlClient" Version="4.8.5" />
</ItemGroup>

Expand Down
8 changes: 4 additions & 4 deletions src/Repositories/MySql/src/BaseMySqlRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ protected Task<int> ExecuteAsync(string sql, object? param = null, CancellationT
/// <param name="param"></param>
/// <param name="token"></param>
/// <returns></returns>
protected Task<T> ExecuteScalarAsync<T>(string sql, object? param = null, CancellationToken token = default)
protected Task<T?> ExecuteScalarAsync<T>(string sql, object? param = null, CancellationToken token = default)
{
return WrapAsync((con, cd) => con.ExecuteScalarAsync<T>(cd),
write: true,
Expand All @@ -95,7 +95,7 @@ protected Task<T> ExecuteScalarAsync<T>(string sql, object? param = null, Cancel
/// <param name="param"></param>
/// <param name="token"></param>
/// <returns></returns>
protected Task<T> QueryScalarValueAsync<T>(string sql, object? param = null, CancellationToken token = default)
protected Task<T?> QueryScalarValueAsync<T>(string sql, object? param = null, CancellationToken token = default)
{
return WrapAsync((con, cd) => con.ExecuteScalarAsync<T>(cd),
write: false,
Expand All @@ -112,7 +112,7 @@ protected Task<T> QueryScalarValueAsync<T>(string sql, object? param = null, Can
/// <param name="param"></param>
/// <param name="token"></param>
/// <returns></returns>
protected Task<T> QueryFirstAsync<T>(string sql, object? param = null, CancellationToken token = default)
protected Task<T?> QueryFirstAsync<T>(string sql, object? param = null, CancellationToken token = default)
{
return WrapAsync((con, cd) => con.QueryFirstOrDefaultAsync<T>(cd),
write: false,
Expand All @@ -129,7 +129,7 @@ protected Task<T> QueryFirstAsync<T>(string sql, object? param = null, Cancellat
/// <param name="param"></param>
/// <param name="token"></param>
/// <returns></returns>
protected Task<T> QuerySingleAsync<T>(string sql, object? param = null, CancellationToken token = default)
protected Task<T?> QuerySingleAsync<T>(string sql, object? param = null, CancellationToken token = default)
{
return WrapAsync((con, cd) => con.QuerySingleOrDefaultAsync<T>(cd),
write: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Dapper" Version="2.0.151" />
<PackageReference Include="Dapper" Version="2.1.4" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.1" />
<PackageReference Include="MySqlConnector" Version="2.2.7" />
<PackageReference Include="Polly" Version="8.0.0" />
Expand Down
Loading