TanvirArjel.EFCore.GenericRepository
3.1.1
See the version list below for details.
dotnet add package TanvirArjel.EFCore.GenericRepository --version 3.1.1
NuGet\Install-Package TanvirArjel.EFCore.GenericRepository -Version 3.1.1
<PackageReference Include="TanvirArjel.EFCore.GenericRepository" Version="3.1.1" />
paket add TanvirArjel.EFCore.GenericRepository --version 3.1.1
#r "nuget: TanvirArjel.EFCore.GenericRepository, 3.1.1"
// Install TanvirArjel.EFCore.GenericRepository as a Cake Addin #addin nuget:?package=TanvirArjel.EFCore.GenericRepository&version=3.1.1 // Install TanvirArjel.EFCore.GenericRepository as a Cake Tool #tool nuget:?package=TanvirArjel.EFCore.GenericRepository&version=3.1.1
How do I get started?
First, install the appropriate version of this NuGet package into your project as follows:
**For EF Core 2.x 😗*
Install-Package TanvirArjel.EFCore.GenericRepository -Version 2.0.1
**For EF Core 3.0 😗*
Install-Package TanvirArjel.EFCore.GenericRepository -Version 3.0.1
**For EF Core >= 3.1 😗*
Install-Package TanvirArjel.EFCore.GenericRepository -Version 3.1.1
Then in the ConfirugeServices
method of the Startup
class:
public void ConfigureServices(IServiceCollection services)
{
string connectionString = Configuration.GetConnectionString("RepositoryDbConnection");
services.AddDbContext<DemoDbContext>(option => option.UseSqlServer(connectionString));
services.AddGenericRepository<DemoDbContext>(); // Call it just after registering your DbConext.
}
Usage:
Now inject IUnitOfWork
interface in your relevant class constructor and use as follows:
public class EmployeeService
{
private readonly IUnitOfWork _unitOfWork;
public EmployeeService(IUnitOfWork unitOfWork)
{
_unitOfWork = unitOfWork;
}
public async Task<Employee> GetEmployeeAsync(int employeeId)
{
Employee employee = await _unitOfWork.Repository<Employee>().GetEntityByIdAsync(1);
return employee;
}
}
To see more details documentation, please visit GitHub Repository
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Microsoft.EntityFrameworkCore.Relational (>= 3.1.0)
- System.Linq.Dynamic.Core (>= 1.0.19)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on TanvirArjel.EFCore.GenericRepository:
Package | Downloads |
---|---|
Shaesk.Domain
Package For Shaesk Domain |
GitHub repositories (2)
Showing the top 2 popular GitHub repositories that depend on TanvirArjel.EFCore.GenericRepository:
Repository | Stars |
---|---|
TanvirArjel/CleanArchitecture
This repository contains the implementation of domain-driven design and clear architecture in ASP.NET Core.
|
|
YSGStudyHards/DotNetExercises
⚔【DotNetGuide专栏C#/.NET/.NET Core编程技巧练习集】C#/.NET/.NET Core编程常用语法、算法、技巧、中间件、类库、工作业务实操练习集,配套详细的文章教程讲解,助你快速掌握C#/.NET/.NET Core中各种编程常用语法、算法、技巧、中间件、类库、工作业务实操等等。
|
Version | Downloads | Last updated |
---|---|---|
6.0.4 | 6,284 | 1/13/2024 |
6.0.3 | 2,234 | 1/1/2024 |
6.0.2 | 1,383 | 11/20/2023 |
6.0.1 | 2,584 | 9/9/2023 |
6.0.0 | 10,944 | 11/9/2022 |
6.0.0-preview1 | 149 | 10/19/2022 |
5.9.1 | 6,489 | 8/21/2022 |
5.9.0 | 13,300 | 6/9/2022 |
5.8.1 | 514 | 6/7/2022 |
5.8.0 | 11,575 | 11/12/2021 |
5.7.0 | 632 | 10/6/2021 |
5.6.0 | 582 | 8/13/2021 |
5.5.0 | 4,055 | 4/7/2021 |
5.4.0 | 252 | 3/30/2021 |
5.3.0 | 374 | 3/27/2021 |
5.2.2 | 730 | 2/12/2021 |
5.2.1 | 413 | 2/8/2021 |
5.2.0 | 370 | 2/7/2021 |
5.1.0 | 493 | 1/14/2021 |
5.0.0 | 659 | 11/12/2020 |
3.1.2 | 1,639 | 5/20/2020 |
3.1.1 | 552 | 4/25/2020 |
3.1.0 | 516 | 4/23/2020 |
3.0.2 | 568 | 5/20/2020 |
3.0.1 | 505 | 4/25/2020 |
3.0.0 | 516 | 4/23/2020 |
2.0.2 | 558 | 5/20/2020 |
2.0.1 | 487 | 4/25/2020 |
2.0.0 | 485 | 4/23/2020 |
The release contains the following bug fixes:
1. Entity projection to value type was not working due to the reference type constraint. It has been fixed.
2. XML comments were not showing on IntelliSense. It has been fixed.