Добавлен префикс таблицам первой структуры базы
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.DAL.Models;
|
||||
using PARR.DAL.Models.V1;
|
||||
using PARR.DAL.Services.Abstracts;
|
||||
using PARR.DAL.Services.Interfaces;
|
||||
|
||||
namespace PARR.DAL.Services.Implementations
|
||||
{
|
||||
internal class ApplicationInHostService : BaseService<ApplicationInHost>, IApplicationInHostService
|
||||
internal class ApplicationInHostService : BaseService<V1_ApplicationInHost>, IApplicationInHostService
|
||||
{
|
||||
private readonly DataContext dataContext;
|
||||
private readonly ILogger<ApplicationInHostService> logger;
|
||||
@@ -18,7 +18,7 @@ namespace PARR.DAL.Services.Implementations
|
||||
this.logger = logger;
|
||||
}
|
||||
|
||||
protected override DbSet<ApplicationInHost> EntitySet => dataContext.ApplicationsInHosts;
|
||||
protected override DbSet<V1_ApplicationInHost> EntitySet => dataContext.ApplicationsInHosts;
|
||||
|
||||
protected override DataContext EntitiContext => dataContext;
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.DAL.Models;
|
||||
using PARR.DAL.Models.V1;
|
||||
using PARR.DAL.Services.Abstracts;
|
||||
using PARR.DAL.Services.Interfaces;
|
||||
|
||||
namespace PARR.DAL.Services.Implementations
|
||||
{
|
||||
internal class ApplicationService : BaseService<Application>, IApplicationService
|
||||
internal class ApplicationService : BaseService<V1_Application>, IApplicationService
|
||||
{
|
||||
private readonly DataContext dataContext;
|
||||
private readonly ILogger<ApplicationService> logger;
|
||||
@@ -18,11 +18,11 @@ namespace PARR.DAL.Services.Implementations
|
||||
this.logger = logger;
|
||||
}
|
||||
|
||||
protected override DbSet<Application> EntitySet => dataContext.Applications;
|
||||
protected override DbSet<V1_Application> EntitySet => dataContext.Applications;
|
||||
|
||||
protected override DataContext EntitiContext => dataContext;
|
||||
|
||||
public async Task<Application?> GetByNameAsync(string appName)
|
||||
public async Task<V1_Application?> GetByNameAsync(string appName)
|
||||
{
|
||||
return await EntitySet.FirstOrDefaultAsync(t => t.Name.ToLower() == appName.Trim().ToLower());
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.DAL.Models;
|
||||
using PARR.DAL.Models.V1;
|
||||
using PARR.DAL.Services.Abstracts;
|
||||
using PARR.DAL.Services.Interfaces;
|
||||
|
||||
namespace PARR.DAL.Services.Implementations
|
||||
{
|
||||
internal class ApplicationTypeService : BaseService<ApplicationType>, IApplicationTypeService
|
||||
internal class ApplicationTypeService : BaseService<V1_ApplicationType>, IApplicationTypeService
|
||||
{
|
||||
private readonly DataContext dataContext;
|
||||
private readonly ILogger<ApplicationTypeService> logger;
|
||||
@@ -18,7 +18,7 @@ namespace PARR.DAL.Services.Implementations
|
||||
this.logger = logger;
|
||||
}
|
||||
|
||||
protected override DbSet<ApplicationType> EntitySet => dataContext.ApplicationTypes;
|
||||
protected override DbSet<V1_ApplicationType> EntitySet => dataContext.ApplicationTypes;
|
||||
|
||||
protected override DataContext EntitiContext => dataContext;
|
||||
}
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.DAL.Models;
|
||||
using PARR.DAL.Models.V1;
|
||||
using PARR.DAL.Services.Abstracts;
|
||||
using PARR.DAL.Services.Interfaces;
|
||||
|
||||
namespace PARR.DAL.Services.Implementations
|
||||
{
|
||||
internal class HostService : BaseService<Host>, IHostService
|
||||
internal class HostService : BaseService<V1_Host>, IHostService
|
||||
{
|
||||
private readonly DataContext dataContext;
|
||||
private readonly ILogger<HostService> logger;
|
||||
|
||||
protected override DbSet<Host> EntitySet => dataContext.Hosts;
|
||||
protected override DbSet<V1_Host> EntitySet => dataContext.Hosts;
|
||||
|
||||
protected override DataContext EntitiContext => dataContext;
|
||||
public HostService(DataContext dataContext, ILogger<HostService> logger) : base(logger)
|
||||
@@ -21,7 +21,7 @@ namespace PARR.DAL.Services.Implementations
|
||||
this.logger = logger;
|
||||
}
|
||||
|
||||
public async Task<Host?> GetHostWithAppsAsync(string IP, string RegionalEK)
|
||||
public async Task<V1_Host?> GetHostWithAppsAsync(string IP, string RegionalEK)
|
||||
{
|
||||
|
||||
//try
|
||||
@@ -40,7 +40,7 @@ namespace PARR.DAL.Services.Implementations
|
||||
.FirstOrDefaultAsync(h => h.IP == IP && h.RegionalEK == RegionalEK);
|
||||
}
|
||||
|
||||
public async Task<Host?> GetHostWithAppsAsync(string IP, string linkEK, string regionalEK)
|
||||
public async Task<V1_Host?> GetHostWithAppsAsync(string IP, string linkEK, string regionalEK)
|
||||
{
|
||||
return await EntitySet
|
||||
.Include(t => t.ApplicationsInHosts).ThenInclude(a => a.Application).ThenInclude(t => t.ApplicationType)
|
||||
@@ -49,7 +49,7 @@ namespace PARR.DAL.Services.Implementations
|
||||
}
|
||||
|
||||
|
||||
public async Task<Host?> GetHostByIPAndRegionalEKAsync(string IP, string RegionalEK)
|
||||
public async Task<V1_Host?> GetHostByIPAndRegionalEKAsync(string IP, string RegionalEK)
|
||||
{
|
||||
return await EntitySet.FirstOrDefaultAsync(h => h.IP == IP && h.RegionalEK == RegionalEK);
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ using PARR.DAL.Services.Interfaces;
|
||||
|
||||
namespace PARR.DAL.Services.Implementations
|
||||
{
|
||||
internal class JobCategoryService : BaseService<JobCategory>, IJobCategoryService
|
||||
internal class JobCategoryService : BaseService<V1_JobCategory>, IJobCategoryService
|
||||
{
|
||||
private readonly DataContext dataContext;
|
||||
private readonly ILogger<JobCategoryService> logger;
|
||||
@@ -17,7 +17,7 @@ namespace PARR.DAL.Services.Implementations
|
||||
this.dataContext = dataContext;
|
||||
this.logger = logger;
|
||||
}
|
||||
protected override DbSet<JobCategory> EntitySet => dataContext.JobCategories;
|
||||
protected override DbSet<V1_JobCategory> EntitySet => dataContext.JobCategories;
|
||||
|
||||
protected override DataContext EntitiContext => dataContext;
|
||||
}
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
using Microsoft.Extensions.Logging;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.DAL.Extensions;
|
||||
using PARR.DAL.Models;
|
||||
using PARR.DAL.Models.V1;
|
||||
using PARR.DAL.Services.Abstracts;
|
||||
using PARR.DAL.Services.Interfaces;
|
||||
|
||||
namespace PARR.DAL.Services.Implementations
|
||||
{
|
||||
internal class JobJournalService : BaseService<JobJournal>, IJobJournalService
|
||||
internal class JobJournalService : BaseService<V1_JobJournal>, IJobJournalService
|
||||
{
|
||||
private readonly DataContext dataContext;
|
||||
private readonly ILogger<JobJournalService> logger;
|
||||
@@ -18,11 +18,11 @@ namespace PARR.DAL.Services.Implementations
|
||||
this.dataContext = dataContext;
|
||||
this.logger = logger;
|
||||
}
|
||||
protected override DbSet<JobJournal> EntitySet => dataContext.JobJournals;
|
||||
protected override DbSet<V1_JobJournal> EntitySet => dataContext.JobJournals;
|
||||
|
||||
protected override DataContext EntitiContext => dataContext;
|
||||
|
||||
public async Task<JobJournal?> GetLastAsync(Guid jobId, Guid hostId, DateTimeOffset date)
|
||||
public async Task<V1_JobJournal?> GetLastAsync(Guid jobId, Guid hostId, DateTimeOffset date)
|
||||
{
|
||||
//var n=DateTimeOffset.UtcNow;
|
||||
//var opers = await EntitySet
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.DAL.Models;
|
||||
using PARR.DAL.Models.V1;
|
||||
using PARR.DAL.Services.Abstracts;
|
||||
using PARR.DAL.Services.Interfaces;
|
||||
|
||||
namespace PARR.DAL.Services.Implementations
|
||||
{
|
||||
internal class JobModeService : BaseService<JobMode>, IJobModeService
|
||||
internal class JobModeService : BaseService<V1_JobMode>, IJobModeService
|
||||
{
|
||||
private readonly DataContext dataContext;
|
||||
private readonly ILogger<JobModeService> logger;
|
||||
@@ -17,7 +17,7 @@ namespace PARR.DAL.Services.Implementations
|
||||
this.dataContext = dataContext;
|
||||
this.logger = logger;
|
||||
}
|
||||
protected override DbSet<JobMode> EntitySet => dataContext.JobModes;
|
||||
protected override DbSet<V1_JobMode> EntitySet => dataContext.JobModes;
|
||||
|
||||
protected override DataContext EntitiContext => dataContext;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.DAL.Models;
|
||||
using PARR.DAL.Models.V1;
|
||||
using PARR.DAL.Services.Abstracts;
|
||||
using PARR.DAL.Services.Interfaces;
|
||||
using System;
|
||||
@@ -12,7 +12,7 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace PARR.DAL.Services.Implementations
|
||||
{
|
||||
internal class JobService : BaseService<Job>, IJobService
|
||||
internal class JobService : BaseService<V1_Job>, IJobService
|
||||
{
|
||||
private readonly DataContext dataContext;
|
||||
private readonly ILogger<JobService> logger;
|
||||
@@ -22,7 +22,7 @@ namespace PARR.DAL.Services.Implementations
|
||||
this.dataContext = dataContext;
|
||||
this.logger = logger;
|
||||
}
|
||||
protected override DbSet<Job> EntitySet => dataContext.Jobs;
|
||||
protected override DbSet<V1_Job> EntitySet => dataContext.Jobs;
|
||||
|
||||
protected override DataContext EntitiContext => dataContext;
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.DAL.Models;
|
||||
using PARR.DAL.Models.V1;
|
||||
using PARR.DAL.Services.Abstracts;
|
||||
using PARR.DAL.Services.Interfaces;
|
||||
|
||||
namespace PARR.DAL.Services.Implementations
|
||||
{
|
||||
internal class JobStatusService : BaseService<JobStatus>, IJobStatusService
|
||||
internal class JobStatusService : BaseService<V1_JobStatus>, IJobStatusService
|
||||
{
|
||||
private readonly DataContext dataContext;
|
||||
private readonly ILogger<JobStatusService> logger;
|
||||
@@ -17,7 +17,7 @@ namespace PARR.DAL.Services.Implementations
|
||||
this.dataContext = dataContext;
|
||||
this.logger = logger;
|
||||
}
|
||||
protected override DbSet<JobStatus> EntitySet => dataContext.JobStatuses;
|
||||
protected override DbSet<V1_JobStatus> EntitySet => dataContext.JobStatuses;
|
||||
|
||||
protected override DataContext EntitiContext => dataContext;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user