feat: Вынесены настройки из dal
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.DAL.Settings;
|
||||
using PARR.Domain.Entities.Base;
|
||||
using PARR.Domain.Settings;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
using PARR.DAL.Context;
|
||||
using PARR.DAL.Models.Schedule;
|
||||
using PARR.DAL.Models.Unit;
|
||||
using PARR.DAL.Settings;
|
||||
using PARR.Domain.Entities.Base;
|
||||
using PARR.Domain.Settings;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
|
||||
@@ -18,8 +18,6 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\PARR.BLL\PARR.BLL.csproj" />
|
||||
<ProjectReference Include="..\PARR.Common\PARR.Common.csproj" />
|
||||
<ProjectReference Include="..\PARR.Core\PARR.Core.csproj" />
|
||||
<ProjectReference Include="..\PARR.Domain\PARR.Domain.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -23,8 +23,8 @@ using PARR.DAL.Services.Interfaces;
|
||||
using PARR.DAL.Services.Interfaces.Job;
|
||||
using PARR.DAL.Services.Interfaces.Schedule;
|
||||
using PARR.DAL.Services.Interfaces.Unit;
|
||||
using PARR.DAL.Settings;
|
||||
using PARR.DAL.TaskServices;
|
||||
using PARR.Domain.Settings;
|
||||
|
||||
namespace PARR.DAL
|
||||
{
|
||||
@@ -64,9 +64,9 @@ namespace PARR.DAL
|
||||
//});
|
||||
|
||||
|
||||
var groupedShortcodesCacheSettings = new GroupedShortcodesCacheSettings();
|
||||
configuration.GetSection(nameof(GroupedShortcodesCacheSettings)).Bind(groupedShortcodesCacheSettings);
|
||||
services.AddSingleton(groupedShortcodesCacheSettings);
|
||||
//var groupedShortcodesCacheSettings = new GroupedShortcodesCacheSettings();
|
||||
//configuration.GetSection(nameof(GroupedShortcodesCacheSettings)).Bind(groupedShortcodesCacheSettings);
|
||||
//services.AddSingleton(groupedShortcodesCacheSettings);
|
||||
|
||||
//services.AddSingleton<IRedisCacheService, RedisCacheService>();
|
||||
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
namespace PARR.DAL.Settings
|
||||
{
|
||||
public class GroupedShortcodesCacheSettings
|
||||
{
|
||||
/// <summary>
|
||||
/// Время хранения
|
||||
/// </summary>
|
||||
public TimeSpan ValueTtl { get; set; } = TimeSpan.FromMinutes(20);
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
namespace PARR.DAL.Settings
|
||||
{
|
||||
/// <summary>
|
||||
/// Для использования в моделе, в геттере, ApplicationInWork
|
||||
/// </summary>
|
||||
internal static class PrefixSettings
|
||||
{
|
||||
/// <summary>
|
||||
/// Префикс без динамической приставки
|
||||
/// </summary>
|
||||
public static string PrefixWithoutVariable = "default value";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user