Skip to content

Commit

Permalink
EF Core 6.0 support has been added and v5.6.0 has been released.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tanvir Ahmad Arjel committed Aug 13, 2021
1 parent 27ccfed commit 77d8fbe
Show file tree
Hide file tree
Showing 4 changed files with 104 additions and 101 deletions.
16 changes: 8 additions & 8 deletions EFCore.GenericRepository.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29613.14
# Visual Studio Version 17
VisualStudioVersion = 17.0.31606.5
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{7774A7DC-9B9A-4097-98A5-3E7A8C09E492}"
ProjectSection(SolutionItems) = preProject
Expand All @@ -18,7 +18,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AspNetCore3.1", "demo\AspNe
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnitTest", "demo\UnitTest\UnitTest.csproj", "{375C3AF5-6957-46D1-92F4-869C7E26DE5F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TanvirArjel.EFCore.GenericRepository", "src\TanvirArjel.EFCore.GenericRepository.csproj", "{B0FAE2B2-429E-42DF-A4BF-FA7205225677}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TanvirArjel.EFCore.GenericRepository", "src\TanvirArjel.EFCore.GenericRepository.csproj", "{AA4C340C-24E2-4EB6-A174-4F74E9314CFA}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -38,10 +38,10 @@ Global
{375C3AF5-6957-46D1-92F4-869C7E26DE5F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{375C3AF5-6957-46D1-92F4-869C7E26DE5F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{375C3AF5-6957-46D1-92F4-869C7E26DE5F}.Release|Any CPU.Build.0 = Release|Any CPU
{B0FAE2B2-429E-42DF-A4BF-FA7205225677}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B0FAE2B2-429E-42DF-A4BF-FA7205225677}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B0FAE2B2-429E-42DF-A4BF-FA7205225677}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B0FAE2B2-429E-42DF-A4BF-FA7205225677}.Release|Any CPU.Build.0 = Release|Any CPU
{AA4C340C-24E2-4EB6-A174-4F74E9314CFA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AA4C340C-24E2-4EB6-A174-4F74E9314CFA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AA4C340C-24E2-4EB6-A174-4F74E9314CFA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AA4C340C-24E2-4EB6-A174-4F74E9314CFA}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -50,7 +50,7 @@ Global
{29247626-37E3-43F0-B1D1-ED0CEC02FE69} = {A54E2127-8988-46A4-858A-39A4553504C6}
{FBEBB3BE-86C4-47BF-9634-3D5C43E0FBEE} = {A54E2127-8988-46A4-858A-39A4553504C6}
{375C3AF5-6957-46D1-92F4-869C7E26DE5F} = {A54E2127-8988-46A4-858A-39A4553504C6}
{B0FAE2B2-429E-42DF-A4BF-FA7205225677} = {98A19DB3-ED3F-4327-8F46-CE7C7D71EC65}
{AA4C340C-24E2-4EB6-A174-4F74E9314CFA} = {98A19DB3-ED3F-4327-8F46-CE7C7D71EC65}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {B04FE49F-0045-4944-A589-88C8A33F7594}
Expand Down
11 changes: 6 additions & 5 deletions demo/AspNetCore5.0/Services/EmployeeService.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
using AspNetCore5._0.Data.Models;
using AspNetCore5._0.Dtos;
using Microsoft.EntityFrameworkCore;
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using AspNetCore5._0.Data.Models;
using AspNetCore5._0.Dtos;
using Microsoft.EntityFrameworkCore;
using TanvirArjel.EFCore.GenericRepository;
using TanvirArjel.Extensions.Microsoft.DependencyInjection;

namespace AspNetCore5._0.Services
{
public class EmployeeService : IScopedService
[ScopedService]
public class EmployeeService
{
private readonly IRepository _repository;

Expand Down
2 changes: 1 addition & 1 deletion demo/AspNetCore5.0/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public Startup(IConfiguration configuration)
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
services.AddServicesOfType<IScopedService>();
services.AddServicesOfAllTypes();
string connectionString = Configuration.GetConnectionString("RepositoryDbConnection");
services.AddDbContext<DemoDbContext>(option => option.UseSqlServer(connectionString));

Expand Down
176 changes: 89 additions & 87 deletions src/TanvirArjel.EFCore.GenericRepository.csproj
Original file line number Diff line number Diff line change
@@ -1,94 +1,96 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.1;netcoreapp3.1;net5.0</TargetFrameworks>
<LangVersion>8.0</LangVersion>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
<AssemblyName>TanvirArjel.EFCore.GenericRepository</AssemblyName>
<RootNamespace>TanvirArjel.EFCore.GenericRepository</RootNamespace>
<Description>This library is a Generic Repository implementation for EF Core ORM which will remove developers' pain to write repository layer for each .NET Core and .NET project.
<PropertyGroup>
<TargetFrameworks>netstandard2.1;net5.0;net6.0</TargetFrameworks>
<DisableImplicitNamespaceImports>true</DisableImplicitNamespaceImports>
<LangVersion>8.0</LangVersion>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
<AssemblyName>TanvirArjel.EFCore.GenericRepository</AssemblyName>
<RootNamespace>TanvirArjel.EFCore.GenericRepository</RootNamespace>
<Description>This library is a Generic Repository implementation for EF Core ORM which will remove developers' pain to write repository layer for each .NET Core and .NET project.

This library includes the following notable features:

1. This library can be run on any .NET Core or .NET application which has .NET Core 3.1, .NET Standard 2.1 and .NET 5.0 support.

2. It’s providing the Generic Repository with database transaction support.

3. It has all the required methods to query your data in whatever way you want without getting IQueryable&lt;T&gt; from the repository.

4. It also has Specification&lt;T&gt; pattern support so that you can build your query dynamically i.e. differed query building.

5. It also has database-level projection support for your query.

6. It also has support to run raw SQL command against your relational database.

7. It also has support to choose whether you would like to track your query entity/entities or not.

8. It also has support to reset your EF Core DbContext state whenever you really needed.

9. Most importantly, it has full Unit Testing support. Most importantly, it facilitates the writing unit test with mocking.

10. It also has pagination support.

11. Free raw SQL query support both for complex type and primitive types.</Description>
<Title>EF Core Generic Repository</Title>
<Copyright>©2021 TanvirArjel. All rights reserved.</Copyright>
<PackageProjectUrl>https://github.com/TanvirArjel/EFCore.GenericRepository</PackageProjectUrl>
<RepositoryUrl>https://github.com/TanvirArjel/EFCore.GenericRepository</RepositoryUrl>
<RepositoryType>Git</RepositoryType>
<PackageTags>EFCore, RepositoryLayer, GenericRepository, UnitOfWork, .NET, .NETCore, ASP.NETCore</PackageTags>
<PackageReleaseNotes>1. Methods and extension methods have been added for pagination support.

2. Free raw SQL query support both for complex type and primitive types has been added.</PackageReleaseNotes>
<Version>5.6.0</Version>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageIcon>icon.png</PackageIcon>
<Authors>TanvirArjel</Authors>
<NeutralLanguage>en-US</NeutralLanguage>
</PropertyGroup>

<ItemGroup>
<None Remove="stylecop.json" />
<None Include="..\LICENSE">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
<None Include="images\icon.png">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>

</ItemGroup>

<ItemGroup>
<AdditionalFiles Include="stylecop.json" />
</ItemGroup>

<!--<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="6.0.0-*" />
</ItemGroup>-->

<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="5.0.*" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="3.1.*" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.1'">
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="5.0.*" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.333">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.2.*" />
</ItemGroup>
1. This library can be run on any .NET Core or .NET application which has .NET Core 3.1, .NET Standard 2.1 and .NET 5.0 support.

2. It’s providing the Generic Repository with database transaction support.

3. It has all the required methods to query your data in whatever way you want without getting IQueryable&lt;T&gt; from the repository.

4. It also has Specification&lt;T&gt; pattern support so that you can build your query dynamically i.e. differed query building.

5. It also has database-level projection support for your query.

6. It also has support to run raw SQL command against your relational database.

7. It also has support to choose whether you would like to track your query entity/entities or not.

8. It also has support to reset your EF Core DbContext state whenever you really needed.

9. Most importantly, it has full Unit Testing support. Most importantly, it facilitates the writing unit test with mocking.

10. It also has pagination support.

11. Free raw SQL query support both for complex type and primitive types.
</Description>
<Title>EF Core Generic Repository</Title>
<Copyright>©2021 TanvirArjel. All rights reserved.</Copyright>
<PackageProjectUrl>https://github.com/TanvirArjel/EFCore.GenericRepository</PackageProjectUrl>
<RepositoryUrl>https://github.com/TanvirArjel/EFCore.GenericRepository</RepositoryUrl>
<RepositoryType>Git</RepositoryType>
<PackageTags>EFCore, RepositoryLayer, GenericRepository, UnitOfWork, .NET, .NETCore, ASP.NETCore</PackageTags>
<PackageReleaseNotes>1. EF Core 6.0 support has been added.
</PackageReleaseNotes>
<Version>5.6.0</Version>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageIcon>icon.png</PackageIcon>
<Authors>TanvirArjel</Authors>
<NeutralLanguage>en-US</NeutralLanguage>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>

<ItemGroup>
<None Remove="stylecop.json" />
<None Include="..\LICENSE">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
<None Include="..\README.md">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
<None Include="images\icon.png">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>

</ItemGroup>

<ItemGroup>
<AdditionalFiles Include="stylecop.json" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="6.0.0-*" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="5.0.*" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.1'">
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="5.0.*" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.354">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.2.*" />
</ItemGroup>

</Project>

0 comments on commit 77d8fbe

Please sign in to comment.