feat(api, dal): EsppScheduleTypeScheduleController. В таблицу EsppScheTypeValue добавлено поле Order

This commit is contained in:
Mikhail Trubnikov
2024-04-08 12:16:14 +10:00
parent 7be64e3529
commit 0ddd7bc9d2
12 changed files with 3566 additions and 86 deletions

View File

@@ -0,0 +1,31 @@
using Microsoft.EntityFrameworkCore;
using PARR.DAL.Context;
using PARR.DAL.Models;
using PARR.DAL.Services.Interfaces;
namespace PARR.DAL.Services.Implementations
{
internal class EsppSchTypeScheduleService : IEsppSchTypeScheduleService
{
private readonly DataContext dataContext;
public EsppSchTypeScheduleService(DataContext dataContext)
{
this.dataContext = dataContext;
}
public IQueryable<EsppSchTypeSchedule> Get()
{
return dataContext.EsppSchTypeSchedules;
}
public async Task<EsppSchTypeSchedule?> GetAsync(int id)
{
return await dataContext.EsppSchTypeSchedules
.FirstOrDefaultAsync(t => t.Id == id);
}
}
}