Axolotl.AspNet
8.0.0
See the version list below for details.
dotnet add package Axolotl.AspNet --version 8.0.0
NuGet\Install-Package Axolotl.AspNet -Version 8.0.0
<PackageReference Include="Axolotl.AspNet" Version="8.0.0" />
paket add Axolotl.AspNet --version 8.0.0
#r "nuget: Axolotl.AspNet, 8.0.0"
// Install Axolotl.AspNet as a Cake Addin #addin nuget:?package=Axolotl.AspNet&version=8.0.0 // Install Axolotl.AspNet as a Cake Tool #tool nuget:?package=Axolotl.AspNet&version=8.0.0
Axolotl
A personal shared library for various types of dotnet project types
Sub-packages
Axolotl:
Axolotl.Http:
Axolotl.EFCore:
Axolotl.Razor:
Axolotl.Maui:
Install
The framework is provided as a set of NuGet packages. In many cases you'll only need the base package, but if you need efcore, razor or Maui there are implementation-specific packages available to assist.
To install the minimum requirements:
Install-Package Axolotl
To install support for serialization, AutoFixture, EF Core, Model Binding, or Dapper select the lines that apply:
Install-Package Axolotl
Install-Package Axolotl.Http
Install-Package Axolotl.EFCore
Install-Package Axolotl.AspNet
Install-Package Axolotl.Razor
Install-Package Axolotl.Maui
Asp.Net Core Samples
Added required packages
Install-Package Axolotl
Install-Package Axolotl.EFCore
Install-Package Axolotl.AspNet
Add sample entity
public sealed class Post : AuditableEntity<Guid> {
public string Title { get; set; } = null!;
public Category Category { get; set; } = null!;
public ICollection<Tag> Tags { get; set; } = null!;
}
Add to context
public class ServiceContext : DbContext {
public ServiceContext(DbContextOptions<ServiceContext> options) : base(options) { }
protected override void OnModelCreating(ModelBuilder modelBuilder) { }
public virtual DbSet<Post> Posts { get; set; } = null!;
}
Create optional filter specification
public sealed class CategorySpec : Specification<Post> {
public CategorySpec(IPageFilter filter) {
var search = filter.Search ?? string.Empty;
var text = search.ToLower().Split(" ").ToList().Select(x => x);
Query.Where(x => x.Title != String.Empty && x.Title.Length > 3 && text.Any(p => EF.Functions.Like(x.Title.ToLower(), $"%" + p + "%")))
.AsNoTracking()
.OrderBy(b => b.Title);
}
}
Create feature/endpoint
public class CategoryFeature : GenericFeature<CategoryFeature> {
public override IEndpointRouteBuilder MapEndpoints(IEndpointRouteBuilder endpoints) {
var state = new FeatureState(new List<RouteState> {
new (RouteType.GetAll, typeof(CategorySpec)),
new (RouteType.GetById),
new (RouteType.Create)
});
return SetupGroup<CategoryFeature, Category, Guid>(endpoints, state);
}
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. 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 is compatible. 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. |
-
net7.0
- Ardalis.Specification (>= 7.0.0)
- Axolotl (>= 8.0.0)
- Axolotl.EFCore (>= 8.0.0)
- Microsoft.AspNetCore.OpenApi (>= 7.0.14)
- Microsoft.EntityFrameworkCore (>= 7.0.14)
-
net8.0
- Ardalis.Specification (>= 8.0.0)
- Axolotl (>= 8.0.0)
- Axolotl.EFCore (>= 8.0.0)
- Microsoft.AspNetCore.OpenApi (>= 8.0.0)
- Microsoft.EntityFrameworkCore (>= 8.0.0)
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 |
---|---|---|
8.0.5 | 152 | 1/22/2024 |
8.0.2 | 89 | 1/22/2024 |
8.0.1 | 126 | 1/13/2024 |
8.0.0 | 218 | 11/22/2023 |
8.0.0-rc.1 | 74 | 11/16/2023 |
8.0.0-preview.20 | 77 | 10/3/2023 |
8.0.0-preview.19 | 139 | 7/6/2023 |
8.0.0-preview.18 | 114 | 6/6/2023 |
8.0.0-preview.17 | 90 | 6/6/2023 |
8.0.0-preview.16 | 95 | 6/6/2023 |
8.0.0-preview.14 | 94 | 6/6/2023 |
8.0.0-preview.13 | 89 | 6/6/2023 |
8.0.0-preview.12 | 107 | 6/6/2023 |
8.0.0-preview.11 | 86 | 6/5/2023 |