feat(api): Доделал респонс RobotTaskScheduleResponse

This commit is contained in:
Mikhail Trubnikov
2023-10-11 11:10:35 +10:00
parent a4dde4c59a
commit 8ebdcd6d8a
11 changed files with 212 additions and 8 deletions

View File

@@ -0,0 +1,33 @@
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 EsppSchTypeConfigService : BaseService<EsppSchTypeConfig>, IEsppSchTypeConfigService
{
private readonly DataContext dataContext;
public EsppSchTypeConfigService(DataContext dataContext, ILogger<EsppSchTypeConfigService> logger) : base(logger)
{
this.dataContext = dataContext;
}
protected override DbSet<EsppSchTypeConfig> EntitySet => dataContext.EsppSchTypeConfigs;
protected override DataContext EntitiContext => dataContext;
public IQueryable<EsppSchTypeConfig> GetWithSchIncludes()
{
return Get()
.Include(t => t.EsppSchValues)
.Include(t => t.EsppSchTypeSchedule)
.Include(t => t.EsppSchType)
.ThenInclude(t => t!.EsppSchTypeValues)
.ThenInclude(t => t!.EsppSchValues);
}
}
}