refactor: Projektdateien migriert. Cloud-NuGet-Pakete durch lokale NuGet-Projekte ersetzt.
This commit is contained in:
52
HRD.WebApi/Controllers/BaseMiniController.cs
Normal file
52
HRD.WebApi/Controllers/BaseMiniController.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
using HRD.AppLogger;
|
||||
using HRD.WebApi.DAL;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
|
||||
namespace HRD.WebApi.Controllers
|
||||
{
|
||||
[Route("api/[controller]")]
|
||||
[Produces("application/json")]
|
||||
[ApiController]
|
||||
public abstract class BaseMiniController : Microsoft.AspNetCore.Mvc.Controller
|
||||
{
|
||||
private readonly ILoggerManager _logger;
|
||||
public readonly WebApiBaseContext Context;
|
||||
|
||||
public BaseMiniController(WebApiBaseContext webApiBaseContext)
|
||||
{
|
||||
Context = webApiBaseContext;
|
||||
_logger = new LoggerManager();
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
public void WriteLogDebug(string message, String entityMessage = null)
|
||||
{
|
||||
WriteLogDebug(message, entityMessage);
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
public void WriteLogError(string message, String entityMessage = null)
|
||||
{
|
||||
_logger.LogError(message, entityMessage);
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
public void WriteLogException(Exception exception, String entityMessage = null)
|
||||
{
|
||||
_logger.LogException(exception, entityMessage);
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
public void WriteLogInfo(string message)
|
||||
{
|
||||
_logger.LogInfo(message);
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
public void WriteLogWarn(string message, String entityMessage = null)
|
||||
{
|
||||
_logger.LogWarn(message, entityMessage);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user