ASP.NET Core Integration
Complete guide for integrating EasyMessages with ASP.NET Core web applications.
In This Section
- Overview - ASP.NET Core package features and benefits
- Setup and Configuration - Installation and configuration guide
- Configuration Presets - Environment-specific configuration presets
- API Response Patterns - Standard REST API response patterns
- Logging Integration - ILogger integration for automatic logging
Quick Start
1. Install the Package
dotnet add package RecurPixel.EasyMessages --version 1.0.0
2. Use in Controllers
No DI registration is needed. Use the package directly in your controllers:
[HttpPost]
public IActionResult Create(CreateUserDto dto)
{
var user = _userService.Create(dto);
var msg = Msg.Crud.Created("User").WithData(user);
return StatusCode(msg.HttpStatusCode ?? 200, msg.ToJsonObject());
}
Get started with the Overview guide!