diff --git a/EFCore.GenericRepository.sln b/EFCore.GenericRepository.sln index 2f8d121..d4a1da9 100644 --- a/EFCore.GenericRepository.sln +++ b/EFCore.GenericRepository.sln @@ -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 @@ -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 @@ -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 @@ -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} diff --git a/demo/AspNetCore5.0/Services/EmployeeService.cs b/demo/AspNetCore5.0/Services/EmployeeService.cs index 2e8fb14..906edfd 100644 --- a/demo/AspNetCore5.0/Services/EmployeeService.cs +++ b/demo/AspNetCore5.0/Services/EmployeeService.cs @@ -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; diff --git a/demo/AspNetCore5.0/Startup.cs b/demo/AspNetCore5.0/Startup.cs index 55c7508..17d92d9 100644 --- a/demo/AspNetCore5.0/Startup.cs +++ b/demo/AspNetCore5.0/Startup.cs @@ -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(); + services.AddServicesOfAllTypes(); string connectionString = Configuration.GetConnectionString("RepositoryDbConnection"); services.AddDbContext(option => option.UseSqlServer(connectionString)); diff --git a/src/TanvirArjel.EFCore.GenericRepository.csproj b/src/TanvirArjel.EFCore.GenericRepository.csproj index b300c14..c882487 100644 --- a/src/TanvirArjel.EFCore.GenericRepository.csproj +++ b/src/TanvirArjel.EFCore.GenericRepository.csproj @@ -1,94 +1,96 @@  - - netstandard2.1;netcoreapp3.1;net5.0 - 8.0 - true - true - true - AllEnabledByDefault - TanvirArjel.EFCore.GenericRepository - TanvirArjel.EFCore.GenericRepository - 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. + + netstandard2.1;net5.0;net6.0 + true + 8.0 + true + true + true + AllEnabledByDefault + TanvirArjel.EFCore.GenericRepository + TanvirArjel.EFCore.GenericRepository + 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<T> from the repository. - -4. It also has Specification<T> 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. - EF Core Generic Repository - ©2021 TanvirArjel. All rights reserved. - https://github.com/TanvirArjel/EFCore.GenericRepository - https://github.com/TanvirArjel/EFCore.GenericRepository - Git - EFCore, RepositoryLayer, GenericRepository, UnitOfWork, .NET, .NETCore, ASP.NETCore - 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. - 5.6.0 - LICENSE - icon.png - TanvirArjel - en-US - - - - - - True - - - - True - - - - - - - - - - - - - - - - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - + 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<T> from the repository. + + 4. It also has Specification<T> 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. + + EF Core Generic Repository + ©2021 TanvirArjel. All rights reserved. + https://github.com/TanvirArjel/EFCore.GenericRepository + https://github.com/TanvirArjel/EFCore.GenericRepository + Git + EFCore, RepositoryLayer, GenericRepository, UnitOfWork, .NET, .NETCore, ASP.NETCore + 1. EF Core 6.0 support has been added. + + 5.6.0 + LICENSE + icon.png + TanvirArjel + en-US + README.md + + + + + + True + + + + True + + + + True + + + + + + + + + + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + +