FortiCore 1.0.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package FortiCore --version 1.0.0
NuGet\Install-Package FortiCore -Version 1.0.0
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="FortiCore" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="FortiCore" Version="1.0.0" />
<PackageReference Include="FortiCore" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add FortiCore --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: FortiCore, 1.0.0"
#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.
#:package FortiCore@1.0.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=FortiCore&version=1.0.0
#tool nuget:?package=FortiCore&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
FortiCore Library
FortiCore is a .NET library that provides core functionality for building robust web applications with features like logging, validation, and exception handling. This solution includes both the core library and a test API project.
🚀 Features
Core Library Features
- MediatR Integration - Built-in CQRS pattern support
- Logging System
- Elasticsearch integration
- Request/Response logging
- Exception logging
- Reference ID tracking
- Validation Framework - FluentValidation integration
- Exception Handling - Centralized error management
- Response Standardization - Consistent API responses
🛠 Technology Stack
- .NET 8.0
- MediatR 12.4.1
- FluentValidation
- Elasticsearch
- NEST 7.17.5
- Serilog 4.0
- Docker & Docker Compose
📦 Installation
- Clone the repository
- Build the solution:
dotnet build
- Run the Elasticsearch and Kibana containers:
docker-compose up -d
🔧 Configuration
Elasticsearch Setup
The default configuration connects to:
- Elasticsearch: http://localhost:9200
- Kibana: http://localhost:5601
Logging Configuration
Logs are automatically sent to Elasticsearch with the following information:
- Timestamp
- Log Level
- Method Information
- Request/Response Data
- Execution Time
- Reference ID
💡 Usage Examples
Adding FortiCore to Your Project
builder.Services.AddCustomLogging(typeof(Program).Assembly);
Creating a Query Handler
public class UserInformationQueryHandler : IRequestHandler<UserInformationQuery, UserInformationQueryResult>
{
public async Task<UserInformationQueryResult> Handle(UserInformationQuery request,
CancellationToken cancellationToken)
{
return new UserInformationQueryResult() { Users = list }.ToSuccessResult();
}
}
🔐 License
This project is licensed under the MIT License - see the LICENSE.txt file for details.
👥 Contributors
- Cuneyt Serdaroglu
📫 Support
For support, please open an issue in the repository.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | 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. net9.0 was computed. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- FluentValidation.DependencyInjectionExtensions (>= 12.0.0-preview1)
- MediatR (>= 12.4.1)
- Microsoft.Extensions.Logging (>= 8.0.1)
- NEST (>= 7.17.5)
- Newtonsoft.Json (>= 13.0.3)
- Serilog (>= 4.2.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.