feat: Добавлены таблицы и сервисы для логирования работы робота. Обновлена таблица templates.
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
using PARR.DAL.Context;
|
||||
using PARR.DAL.Models;
|
||||
using PARR.DAL.Services.Interfaces;
|
||||
|
||||
namespace PARR.DAL.Services.Implementations
|
||||
{
|
||||
internal class RobotHistoryLevelService : IRobotHistoryLevelService
|
||||
{
|
||||
private readonly DataContext dataContext;
|
||||
|
||||
public RobotHistoryLevelService(DataContext dataContext)
|
||||
{
|
||||
this.dataContext = dataContext;
|
||||
}
|
||||
|
||||
public IQueryable<RobotHistoryLevel> Get()
|
||||
{
|
||||
return dataContext.RobotHistoryLevels;
|
||||
}
|
||||
}
|
||||
}
|
||||
21
PARR.DAL/Services/Implementations/RobotStatusService.cs
Normal file
21
PARR.DAL/Services/Implementations/RobotStatusService.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using PARR.DAL.Context;
|
||||
using PARR.DAL.Models;
|
||||
using PARR.DAL.Services.Interfaces;
|
||||
|
||||
namespace PARR.DAL.Services.Implementations
|
||||
{
|
||||
internal class RobotStatusService : IRobotStatusService
|
||||
{
|
||||
private readonly DataContext dataContext;
|
||||
|
||||
public RobotStatusService(DataContext dataContext)
|
||||
{
|
||||
this.dataContext = dataContext;
|
||||
}
|
||||
|
||||
public IQueryable<RobotStatus> Get()
|
||||
{
|
||||
return dataContext.RobotStatuses;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.DAL.Models;
|
||||
using PARR.DAL.Services.Abstracts;
|
||||
using PARR.DAL.Services.Interfaces;
|
||||
|
||||
namespace PARR.DAL.Services.Implementations
|
||||
{
|
||||
internal class RobotTemplateHistoryService : BaseService<RobotTemplateHistory>, IRobotTemplateHistoryService
|
||||
{
|
||||
private readonly DataContext dataContext;
|
||||
|
||||
public RobotTemplateHistoryService(DataContext dataContext, ILogger<RobotTemplateHistoryService> logger) : base(logger)
|
||||
{
|
||||
this.dataContext = dataContext;
|
||||
}
|
||||
|
||||
protected override DbSet<RobotTemplateHistory> EntitySet => dataContext.RobotTemplateHistories;
|
||||
|
||||
protected override DataContext EntitiContext => dataContext;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
using PARR.DAL.Context;
|
||||
using PARR.DAL.Models;
|
||||
using PARR.DAL.Services.Interfaces;
|
||||
|
||||
namespace PARR.DAL.Services.Implementations
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user