Azka 4.0.0-alpha.6
This is a prerelease version of Azka.
There is a newer prerelease version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Azka --version 4.0.0-alpha.6
NuGet\Install-Package Azka -Version 4.0.0-alpha.6
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Azka" Version="4.0.0-alpha.6" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Azka --version 4.0.0-alpha.6
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Azka, 4.0.0-alpha.6"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Azka as a Cake Addin #addin nuget:?package=Azka&version=4.0.0-alpha.6&prerelease // Install Azka as a Cake Tool #tool nuget:?package=Azka&version=4.0.0-alpha.6&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Azka
This Package is base on Ardalis.Specification. On this version SaveChangesAsync already move from Repository to UnitOfWork
Entity
public class Item
{
// Property
}
Repository
Interface Repository
public interface IItemRepository : Azka.Repository.IRepositoryBase<Item>
{
}
Implementation Repository
public class ItemRepository : Azka.Repository.RepositoryBase<Item>, IItemRepository
{
}
Unit Of Work
Interface Unit Of Work
public interface IUnitOfWork : Azka.UnitOfWork.IUnitOfWorkBase
{
IItemRepository Items { get; }
}
Implementation Unit Of Work
public class UnitOfWork : Azka.UnitOfWork.UnitOfWorkBase, IUnitOfWork
{
private readonly DbContext _dbContext;
public UnitOfWork(SqlServerDbContext dbContext)
{
_dbContext = dbContext
}
private IItemRepository _itemRepository;
public IItemRepository Item => _itemRepository = _itemRepository??new ItemRepository(_dbContext);
}
Expression Composer
And
Example And
Expression<Func<Item, bool>> sample = f => f.Id == 1;
sample = sample.And(f => f.Name == "name");
result:
((f.Id == 1) AndAlso (f.Name == "name"))
Or
Expression<Func<Item, bool>> sample = f => f.Id == 1;
sample = sample.Or(f => f.Name == "name");
result:
((f.Id == 1) OrElse (f.Name == "name"))
Order By Expression By Property Name
using Ardalis.Specification;
using Azka.Extensions;
namespace AzkaUnitTest;
public sealed class ItemSpecification : Specification<Item>
{
public ItemSpecification(string orderByProperty = nameof(Item.Id), OrderType orderType = OrderType.Ascending)
{
if (orderType == OrderType.Ascending)
{
Query.OrderBy(orderByProperty);
}
else
{
Query.OrderByDescending(orderByProperty);
}
}
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.0
- Ardalis.Specification (>= 6.1.0)
- Ardalis.Specification.EntityFrameworkCore (>= 6.1.0)
- ErrorOr (>= 1.2.1)
- Microsoft.EntityFrameworkCore (>= 7.0.5)
- Newtonsoft.Json (>= 13.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
4.0.0-alpha.17 | 35 | 11/12/2024 |
4.0.0-alpha.16 | 71 | 5/6/2024 |
4.0.0-alpha.15 | 85 | 2/8/2024 |
4.0.0-alpha.14 | 112 | 1/1/2024 |
4.0.0-alpha.13 | 114 | 12/16/2023 |
4.0.0-alpha.12 | 78 | 12/16/2023 |
4.0.0-alpha.11 | 78 | 12/16/2023 |
4.0.0-alpha.10 | 81 | 12/15/2023 |
4.0.0-alpha.9 | 115 | 11/12/2023 |
4.0.0-alpha.8 | 72 | 11/10/2023 |
4.0.0-alpha.7 | 93 | 4/28/2023 |
4.0.0-alpha.6 | 93 | 4/28/2023 |
4.0.0-alpha.5 | 98 | 4/26/2023 |
4.0.0-alpha.4 | 85 | 4/24/2023 |
4.0.0-alpha.3 | 90 | 4/24/2023 |
4.0.0-alpha.2 | 99 | 4/20/2023 |
4.0.0-alpha.1 | 96 | 4/20/2023 |
3.0.0-alpha.6 | 220 | 12/29/2022 |
3.0.0-alpha.5 | 110 | 12/5/2022 |
3.0.0-alpha.4 | 124 | 10/15/2022 |
3.0.0-alpha.2 | 121 | 10/15/2022 |
3.0.0-alpha.1 | 131 | 10/15/2022 |
2.0.1-alpha1 | 195 | 6/8/2022 |
2.0.1-alpha.6 | 122 | 10/14/2022 |
2.0.1-alpha.5 | 124 | 10/2/2022 |
2.0.1-alpha.4 | 136 | 9/19/2022 |
2.0.1-alpha.3 | 120 | 9/10/2022 |
2.0.1-alpha.2 | 146 | 7/14/2022 |
2.0.1-alpha.1 | 144 | 6/11/2022 |
2.0.0 | 544 | 5/21/2022 |
0.0.1-alpha.4 | 145 | 5/9/2022 |
0.0.1-alpha.3 | 138 | 2/6/2022 |
0.0.1-alpha.2 | 157 | 2/5/2022 |
0.0.1-alpha.1 | 156 | 1/22/2022 |