feat(api, dal): EsppScheduleTypeScheduleController. В таблицу EsppScheTypeValue добавлено поле Order
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user