feat(api): управление job auto control из api
This commit is contained in:
@@ -99,7 +99,7 @@ namespace PARR.DAL.Context
|
||||
|
||||
public DbSet<JobRelationshipFilter> JobRelationshipFilters { get; set; }
|
||||
|
||||
|
||||
public DbSet<JobAutoControl> JobAutoControls { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -110,6 +110,7 @@ namespace PARR.DAL
|
||||
services.AddTransient<IJobUnitFilterService, JobUnitFilterService>();
|
||||
services.AddTransient<IFieldFilterService, FieldFilterService>();
|
||||
services.AddTransient<IJobUnitFilterService, JobUnitFilterService>();
|
||||
services.AddTransient<IJobAutoControlService, JobAutoControlService>();
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
using PARR.DAL.Context;
|
||||
using PARR.DAL.Models.Job;
|
||||
using PARR.DAL.Services.Interfaces.Job;
|
||||
|
||||
namespace PARR.DAL.Services.Implementations.Job
|
||||
{
|
||||
internal class JobAutoControlService : IJobAutoControlService
|
||||
{
|
||||
private readonly DataContext dataContext;
|
||||
|
||||
public JobAutoControlService(DataContext dataContext)
|
||||
{
|
||||
this.dataContext = dataContext;
|
||||
}
|
||||
|
||||
public IQueryable<JobAutoControl> Get()
|
||||
{
|
||||
return dataContext.JobAutoControls;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
using PARR.DAL.Models.Job;
|
||||
|
||||
namespace PARR.DAL.Services.Interfaces.Job
|
||||
{
|
||||
public interface IJobAutoControlService
|
||||
{
|
||||
IQueryable<JobAutoControl> Get();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user