Skip to content

Commit

Permalink
Upgraded mongodb driver + new package version released.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandre-spieser committed Jan 27, 2018
1 parent 67e7318 commit 3a42a1c
Show file tree
Hide file tree
Showing 20 changed files with 3,647 additions and 2,836 deletions.
5 changes: 1 addition & 4 deletions CoreIntegrationTests/CoreIntegrationTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,13 @@
<PackageReference Include="Microsoft.Extensions.Identity.Stores" Version="2.0.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.5.0" />
<PackageReference Include="MongoDB.Driver" Version="2.5.0" />
<PackageReference Include="MongoDbGenericRepository" Version="1.3.4" />
<PackageReference Include="xunit" Version="2.3.1" />
<PackageReference Include="xunit.runner.console" Version="2.3.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.0-beta4-build3742" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\MongoDbGenericRepository\MongoDbGenericRepository.csproj" />
</ItemGroup>

<ItemGroup>
<None Update="App.config">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
Expand Down
2 changes: 1 addition & 1 deletion IntegrationTests/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Runtime.InteropServices.RuntimeInformation" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
Expand Down
25 changes: 11 additions & 14 deletions IntegrationTests/IntegrationTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,29 +31,32 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="DnsClient, Version=1.0.7.0, Culture=neutral, PublicKeyToken=4574bb5573c51424, processorArchitecture=MSIL">
<HintPath>..\packages\DnsClient.1.0.7\lib\net45\DnsClient.dll</HintPath>
<HintPath>..\packages\MongoDbGenericRepository.1.3.4\lib\net45\DnsClient.dll</HintPath>
</Reference>
<Reference Include="MongoDB.Bson, Version=2.5.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MongoDB.Bson.2.5.0\lib\net45\MongoDB.Bson.dll</HintPath>
<HintPath>..\packages\MongoDbGenericRepository.1.3.4\lib\net45\MongoDB.Bson.dll</HintPath>
</Reference>
<Reference Include="MongoDB.Driver, Version=2.5.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MongoDB.Driver.2.5.0\lib\net45\MongoDB.Driver.dll</HintPath>
<HintPath>..\packages\MongoDbGenericRepository.1.3.4\lib\net45\MongoDB.Driver.dll</HintPath>
</Reference>
<Reference Include="MongoDB.Driver.Core, Version=2.5.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MongoDB.Driver.Core.2.5.0\lib\net45\MongoDB.Driver.Core.dll</HintPath>
<HintPath>..\packages\MongoDbGenericRepository.1.3.4\lib\net45\MongoDB.Driver.Core.dll</HintPath>
</Reference>
<Reference Include="MongoDbGenericRepository, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MongoDbGenericRepository.1.3.4\lib\net45\MongoDbGenericRepository.dll</HintPath>
</Reference>
<Reference Include="nunit.framework, Version=3.9.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.3.9.0\lib\net45\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Buffers, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Buffers.4.4.0\lib\netstandard2.0\System.Buffers.dll</HintPath>
<Reference Include="System.Buffers, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\MongoDbGenericRepository.1.3.4\lib\net45\System.Buffers.dll</HintPath>
</Reference>
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll</HintPath>
<Reference Include="System.Runtime.InteropServices.RuntimeInformation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\MongoDbGenericRepository.1.3.4\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup>
Expand Down Expand Up @@ -94,11 +97,5 @@
<ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\MongoDbGenericRepository\MongoDbGenericRepository.csproj">
<Project>{efc776c4-2af3-440c-be80-3fbe335817a5}</Project>
<Name>MongoDbGenericRepository</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
5 changes: 3 additions & 2 deletions IntegrationTests/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
<package id="MongoDB.Bson" version="2.5.0" targetFramework="net461" />
<package id="MongoDB.Driver" version="2.5.0" targetFramework="net461" />
<package id="MongoDB.Driver.Core" version="2.5.0" targetFramework="net461" />
<package id="MongoDbGenericRepository" version="1.3.4" targetFramework="net461" />
<package id="NUnit" version="3.9.0" targetFramework="net461" />
<package id="NUnit.ConsoleRunner" version="3.7.0" targetFramework="net461" />
<package id="System.Buffers" version="4.4.0" targetFramework="net461" />
<package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="net461" />
<package id="System.Buffers" version="4.3.0" targetFramework="net461" />
<package id="System.Runtime.InteropServices.RuntimeInformation" version="4.0.0" targetFramework="net461" />
</packages>
1 change: 0 additions & 1 deletion MongoDbGenericRepository/BaseMongoDbRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,6 @@ public List<TProjection> GroupBy<TDocument, TGroupKey, TProjection>(
/// <param name="selector">The grouping criteria.</param>
/// <param name="projection">The projected group result.</param>
/// <param name="partitionKey">The partition key of your document, if any.</param>
/// <returns></returns>
public List<TProjection> GroupBy<TDocument, TGroupKey, TProjection>(Expression<Func<TDocument, bool>> filter,
Expression<Func<TDocument, TGroupKey>> selector,
Expression<Func<IGrouping<TGroupKey, TDocument>, TProjection>> projection,
Expand Down
11 changes: 8 additions & 3 deletions MongoDbGenericRepository/IBaseMongoRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ void AddMany<TDocument, TKey>(IEnumerable<TDocument> documents)
/// <param name="filter">The document filter.</param>
/// <param name="field">The field selector.</param>
/// <param name="value">The new value of the property field.</param>
/// <param name="partitionKey">The value of the partition key.</param>
bool UpdateOne<TDocument, TField>(FilterDefinition<TDocument> filter, Expression<Func<TDocument, TField>> field, TField value, string partitionKey = null)
where TDocument : IDocument;

Expand All @@ -132,6 +133,7 @@ bool UpdateOne<TDocument, TField>(FilterDefinition<TDocument> filter, Expression
/// <param name="filter">The document filter.</param>
/// <param name="field">The field selector.</param>
/// <param name="value">The new value of the property field.</param>
/// <param name="partitionKey">The value of the partition key.</param>
Task<bool> UpdateOneAsync<TDocument, TField>(FilterDefinition<TDocument> filter, Expression<Func<TDocument, TField>> field, TField value, string partitionKey = null)
where TDocument : IDocument;

Expand Down Expand Up @@ -256,6 +258,7 @@ bool UpdateOne<TDocument, TKey, TField>(TDocument documentToModify, Expression<F
/// <param name="filter">The document filter.</param>
/// <param name="field">The field selector.</param>
/// <param name="value">The new value of the property field.</param>
/// <param name="partitionKey">The value of the partition key.</param>
Task<bool> UpdateOneAsync<TDocument, TKey, TField>(FilterDefinition<TDocument> filter, Expression<Func<TDocument, TField>> field, TField value, string partitionKey = null)
where TDocument : IDocument<TKey>
where TKey : IEquatable<TKey>;
Expand All @@ -269,6 +272,7 @@ Task<bool> UpdateOneAsync<TDocument, TKey, TField>(FilterDefinition<TDocument> f
/// <param name="filter">The document filter.</param>
/// <param name="field">The field selector.</param>
/// <param name="value">The new value of the property field.</param>
/// <param name="partitionKey">The value of the partition key.</param>
bool UpdateOne<TDocument, TKey, TField>(FilterDefinition<TDocument> filter, Expression<Func<TDocument, TField>> field, TField value, string partitionKey = null)
where TDocument : IDocument<TKey>
where TKey : IEquatable<TKey>;
Expand Down Expand Up @@ -618,16 +622,17 @@ List<TProjection> GroupBy<TDocument, TGroupKey, TProjection>(
where TDocument : IDocument
where TProjection : class, new();

/// <summary>
/// Groups filtered a collection of documents given a grouping criteria,
/// and returns a dictionary of listed document groups with keys having the different values of the grouping criteria.
/// </summary>
/// <typeparam name="TDocument">The type representing a Document.</typeparam>
/// <typeparam name="TGroupKey">The type of the grouping criteria.</typeparam>
/// <typeparam name="TProjection">The type of the projected group.</typeparam>
/// <param name="groupingCriteria">The grouping criteria.</param>
/// <param name="groupProjection">The projected group result.</param>
/// <param name="filter"></param>
/// <param name="selector">The grouping criteria.</param>
/// <param name="projection">The projected group result.</param>
/// <param name="partitionKey">The partition key of your document, if any.</param>
/// <returns></returns>
List<TProjection> GroupBy<TDocument, TGroupKey, TProjection>(Expression<Func<TDocument, bool>> filter,
Expression<Func<TDocument, TGroupKey>> selector,
Expression<Func<IGrouping<TGroupKey, TDocument>, TProjection>> projection,
Expand Down
6 changes: 3 additions & 3 deletions MongoDbGenericRepository/MongoDbGenericRepository.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
<package >
<metadata>
<id>MongoDbGenericRepository</id>
<version>1.3.3</version>
<version>1.3.4</version>
<title>MongoDb Generic Repository</title>
<authors>Alexandre Spieser</authors>
<owners>Alexandre Spieser</owners>
<licenseUrl>http://www.opensource.org/licenses/mit-license.php</licenseUrl>
<projectUrl>https://github.com/alexandre-spieser/mongodb-generic-repository</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>A generic repository implementation using the MongoDB C# Sharp 2.0 driver.</description>
<releaseNotes>The MongoDbRepository now has a constructor that takes an IMongoDatabase.</releaseNotes>
<releaseNotes>Updating MongoDB driver to version 2.5.0 for MongoDB 3.6 support.</releaseNotes>
<copyright>Copyright 2017 (c) Alexandre Spieser. All rights reserved.</copyright>
<tags>MongoDb Repository Generic NoSql</tags>
<dependencies>
<dependency id="MongoDB.Driver" version="2.4.4" />
<dependency id="MongoDB.Driver" version="2.5.0" />
</dependencies>
</metadata>
<files>
Expand Down
Binary file added MongoDbGenericRepository/lib/net45/DnsClient.dll
Binary file not shown.
Binary file modified MongoDbGenericRepository/lib/net45/MongoDB.Bson.dll
Binary file not shown.
Binary file modified MongoDbGenericRepository/lib/net45/MongoDB.Driver.Core.dll
Binary file not shown.
Binary file modified MongoDbGenericRepository/lib/net45/MongoDB.Driver.dll
Binary file not shown.
Binary file modified MongoDbGenericRepository/lib/net45/MongoDbGenericRepository.dll
Binary file not shown.
Loading

0 comments on commit 3a42a1c

Please sign in to comment.