Добавлен префикс таблицам первой структуры базы

This commit is contained in:
Mikhail Kuznetsov
2023-08-10 10:14:41 +10:00
parent f3538fdd5d
commit 39b1333969
38 changed files with 157 additions and 450 deletions

View File

@@ -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);
}