Updated to .Net Core 8
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
using MongoDB.Driver.Linq;
|
||||
using MongoDbGenericRepository.Models;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
|
||||
namespace MongoDbGenericRepository.DataAccess.Base
|
||||
@@ -35,7 +36,7 @@ namespace MongoDbGenericRepository.DataAccess.Base
|
||||
/// <param name="filter">The filter definition.</param>
|
||||
/// <param name="partitionKey">The collection partition key.</param>
|
||||
/// <returns></returns>
|
||||
public virtual IMongoQueryable<TDocument> GetQuery<TDocument, TKey>(Expression<Func<TDocument, bool>> filter, string partitionKey = null)
|
||||
public virtual IQueryable<TDocument> GetQuery<TDocument, TKey>(Expression<Func<TDocument, bool>> filter, string partitionKey = null)
|
||||
where TDocument : IDocument<TKey>
|
||||
where TKey : IEquatable<TKey>
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
using MongoDB.Driver;
|
||||
using MongoDB.Driver.Linq;
|
||||
@@ -19,7 +20,7 @@ namespace MongoDbGenericRepository.DataAccess.Base
|
||||
/// <param name="filter">The filter definition.</param>
|
||||
/// <param name="partitionKey">The collection partition key.</param>
|
||||
/// <returns></returns>
|
||||
IMongoQueryable<TDocument> GetQuery<TDocument, TKey>(Expression<Func<TDocument, bool>> filter, string partitionKey = null)
|
||||
IQueryable<TDocument> GetQuery<TDocument, TKey>(Expression<Func<TDocument, bool>> filter, string partitionKey = null)
|
||||
where TDocument : IDocument<TKey>
|
||||
where TKey : IEquatable<TKey>;
|
||||
|
||||
|
||||
@@ -97,7 +97,6 @@ namespace MongoDbGenericRepository
|
||||
// GuidRepresentation and GuidRepresentationMode will be removed in the next major release of the MongoDB Driver.
|
||||
// We can safely replace this with RepositorySerializationProvider.Instance.RegisterSerializer once we upgrade to the next major release.
|
||||
#pragma warning disable CS0618
|
||||
BsonDefaults.GuidRepresentationMode = GuidRepresentationMode.V3;
|
||||
RepositorySerializationProvider.Instance.RegisterSerializer(new GuidSerializer(guidRepresentation));
|
||||
#pragma warning restore CS0618
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net472;netstandard2.0;</TargetFrameworks>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<PackageId>MongoDbGenericRepository</PackageId>
|
||||
<PackageVersion>1.6.2</PackageVersion>
|
||||
@@ -18,6 +17,8 @@
|
||||
<Version>1.6.2</Version>
|
||||
<RepositoryUrl>https://github.com/alexandre-spieser/mongodb-generic-repository</RepositoryUrl>
|
||||
<RepositoryType>Git</RepositoryType>
|
||||
<TargetFramework>netstandard2.1</TargetFramework>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
@@ -25,7 +26,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MongoDB.Driver" Version="2.28.0" />
|
||||
<PackageReference Include="MongoDB.Driver" Version="3.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
Reference in New Issue
Block a user