mirror of
https://github.com/sphildreth/roadie
synced 2025-02-17 05:28:28 +00:00
39 lines
No EOL
1.2 KiB
C#
39 lines
No EOL
1.2 KiB
C#
using Mapster;
|
|
using Microsoft.AspNet.OData;
|
|
using Microsoft.Extensions.Configuration;
|
|
using Microsoft.Extensions.Logging;
|
|
using Roadie.Library.Caching;
|
|
using Roadie.Library.Configuration;
|
|
using Roadie.Library.Data;
|
|
|
|
namespace Roadie.Api.Controllers
|
|
{
|
|
public abstract class EntityControllerBase : ODataController
|
|
{
|
|
protected readonly ICacheManager _cacheManager;
|
|
protected readonly IConfiguration _configuration;
|
|
protected readonly IRoadieDbContext _RoadieDbContext;
|
|
protected readonly IRoadieSettings _roadieSettings;
|
|
|
|
protected ILogger _logger;
|
|
|
|
protected IRoadieSettings RoadieSettings
|
|
{
|
|
get
|
|
{
|
|
return this._roadieSettings;
|
|
}
|
|
}
|
|
|
|
public EntityControllerBase(IRoadieDbContext RoadieDbContext, ICacheManager cacheManager, IConfiguration configuration)
|
|
{
|
|
this._RoadieDbContext = RoadieDbContext;
|
|
this._cacheManager = cacheManager;
|
|
this._configuration = configuration;
|
|
|
|
this._roadieSettings = new RoadieSettings();
|
|
this._configuration.GetSection("RoadieSettings").Bind(this._roadieSettings);
|
|
|
|
}
|
|
}
|
|
} |