Skip to content

Commit

Permalink
fix: cleanup filterdata.ordered
Browse files Browse the repository at this point in the history
Refs: #195
  • Loading branch information
phnx47 committed Jul 3, 2023
1 parent 7f499fb commit 86fee38
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/MicroOrm.Dapper.Repositories.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<Description>CRUD for Dapper</Description>
<Copyright>2015 © Serge K</Copyright>
<VersionPrefix>1.25.0</VersionPrefix>
<VersionPrefix>1.25.1</VersionPrefix>
<Authors>Serge K and Contributors</Authors>
<TargetFrameworks>net461;netstandard2.0;net5.0</TargetFrameworks>
<LangVersion>11.0</LangVersion>
Expand Down
10 changes: 9 additions & 1 deletion src/ReadOnlyDapperRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,17 @@ public void Dispose()
{
_connection?.Dispose();
_connection = null;

if (_filterData == null)
return;
_filterData.LimitInfo = null;

_filterData.Ordered = false;

if (_filterData.LimitInfo != null)
{
_filterData.LimitInfo = null;
}

if (_filterData.OrderInfo != null)
{
_filterData.OrderInfo.Columns?.Clear();
Expand Down
2 changes: 2 additions & 0 deletions src/SqlGenerator/Filters/OrderInfo.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
using System.Collections.Generic;

// ReSharper disable InconsistentNaming

namespace MicroOrm.Dapper.Repositories.SqlGenerator.Filters;

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion src/SqlGenerator/Filters/SelectInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace MicroOrm.Dapper.Repositories.SqlGenerator.Filters;

/// <summary>
///
/// Select Info
/// </summary>
public class SelectInfo
{
Expand Down

0 comments on commit 86fee38

Please sign in to comment.