Nera.Lib.Core
1.0.6
dotnet add package Nera.Lib.Core --version 1.0.6
NuGet\Install-Package Nera.Lib.Core -Version 1.0.6
<PackageReference Include="Nera.Lib.Core" Version="1.0.6" />
<PackageVersion Include="Nera.Lib.Core" Version="1.0.6" />
<PackageReference Include="Nera.Lib.Core" />
paket add Nera.Lib.Core --version 1.0.6
#r "nuget: Nera.Lib.Core, 1.0.6"
#:package Nera.Lib.Core@1.0.6
#addin nuget:?package=Nera.Lib.Core&version=1.0.6
#tool nuget:?package=Nera.Lib.Core&version=1.0.6
Nera.Lib.Core
A comprehensive .NET 9 library providing core utilities, extensions, validation, and common components for Nera applications.
📦 Installation
dotnet add package Nera.Lib.Core
🚀 Features
- Extensions: Useful extension methods for common types
- Validation: FluentValidation integration and common validation rules
- CQRS: MediatR integration and command/query patterns
- Logging: Serilog configuration and extensions
- Security: JWT authentication and authorization helpers
- Error Handling: Global exception handling and error responses
- Pagination: Built-in pagination support
- Results: Method result patterns for better error handling
📚 Usage
Basic Setup
using Nera.Lib.Core;
// Add services to DI container
builder.Services.AddNeraCore();
// Configure logging
builder.Host.UseNeraLogging();
Validation
using Nera.Lib.Core.Validation;
public class UserValidator : AbstractValidator<User>
{
public UserValidator()
{
RuleFor(x => x.Email).NotEmpty().EmailAddress();
RuleFor(x => x.Password).MinimumLength(8);
}
}
Result Patterns
using Nera.Lib.Core.Results;
public async Task<MethodResult<User>> GetUserAsync(int id)
{
var user = await _repository.GetByIdAsync(id);
return user != null
? MethodResult<User>.Success(user)
: MethodResult<User>.Failure("User not found");
}
🏗️ Requirements
- .NET 9.0 or later
- ASP.NET Core 9.0 (for web features)
📖 Documentation
For detailed documentation and examples, visit our Wiki.
🤝 Contributing
We welcome contributions! Please see our Contributing Guide for details.
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🏢 About
Developed by Nextera Systems for building robust .NET applications.
Version: 1.0.0
Target Framework: .NET 9.0
Repository: https://github.com/nextera-systems/nera-lib-core
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net9.0
- FluentValidation (>= 12.0.0)
- FluentValidation.DependencyInjectionExtensions (>= 12.0.0)
- Mapster (>= 7.4.0)
- MediatR (>= 13.0.0)
- Microsoft.AspNetCore.Authentication.JwtBearer (>= 9.0.6)
- Microsoft.AspNetCore.Mvc.NewtonsoftJson (>= 9.0.6)
- Microsoft.AspNetCore.Mvc.Versioning (>= 5.1.0)
- Microsoft.AspNetCore.Mvc.Versioning.ApiExplorer (>= 5.1.0)
- Microsoft.EntityFrameworkCore (>= 9.0.6)
- Microsoft.EntityFrameworkCore.Abstractions (>= 9.0.6)
- Microsoft.EntityFrameworkCore.Relational (>= 9.0.6)
- Microsoft.Extensions.Configuration.Abstractions (>= 9.0.6)
- Microsoft.Extensions.Configuration.EnvironmentVariables (>= 9.0.6)
- Microsoft.Extensions.Configuration.Json (>= 9.0.6)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.6)
- Microsoft.Extensions.Hosting.Abstractions (>= 9.0.6)
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.6)
- Microsoft.Extensions.Options (>= 9.0.6)
- Microsoft.IdentityModel.Tokens (>= 8.12.1)
- Newtonsoft.Json (>= 13.0.3)
- Serilog (>= 4.3.0)
- Serilog.AspNetCore (>= 9.0.0)
- Serilog.Enrichers.Environment (>= 3.0.1)
- Serilog.Extensions.Hosting (>= 9.0.0)
- Serilog.Extensions.Logging (>= 9.0.2)
- Serilog.Filters.Expressions (>= 2.1.0)
- Serilog.Formatting.Compact (>= 3.0.0)
- Serilog.Formatting.Elasticsearch (>= 10.0.0)
- Serilog.Sinks.Console (>= 6.0.0)
- Serilog.Sinks.Elasticsearch (>= 10.0.0)
- Serilog.Sinks.File (>= 7.0.0)
- Swashbuckle.AspNetCore (>= 9.0.1)
- System.Text.Json (>= 9.0.6)
NuGet packages (5)
Showing the top 5 NuGet packages that depend on Nera.Lib.Core:
Package | Downloads |
---|---|
Nera.Lib.Web
Web models, business rules, aggregates, value objects, and domain services for Nera applications |
|
Nera.Lib.Domain
Domain models, business rules, aggregates, value objects, and domain services for Nera applications |
|
Nera.Lib.Infrastructure
Domain models, business rules, aggregates, value objects, and domain services for Nera applications |
|
Nera.Lib.Gateway
Kong API Gateway integration library for Nextera Systems microservices, providing service registration, routing, authentication, rate limiting, and other gateway features. |
|
Nera.Lib.Database
Database access layer with Entity Framework Core, Repository pattern, Specification pattern, and advanced querying capabilities for Nera applications |
GitHub repositories
This package is not used by any popular GitHub repositories.