update values for snap and offset

fix some issues from .NET Core 3.0 upgrade
This commit is contained in:
RaidMax
2019-10-07 10:26:07 -05:00
parent c4e0b0272c
commit 068e943fd3
14 changed files with 1522 additions and 265 deletions

View File

@ -290,26 +290,26 @@ namespace SharedLibraryCore.Services
{
using (var context = new DatabaseContext(true))
{
var iqClient = from client in context.Clients
var iqClient = from _c in context.Clients
.Include(c => c.CurrentAlias)
.Include(c => c.AliasLink.Children)
.Include(c => c.Meta)
where client.ClientId == entityID
select new
{
Client = client,
LinkedAccounts = (from linkedClient in context.Clients
where client.AliasLinkId == linkedClient.AliasLinkId
select new
{
linkedClient.ClientId,
linkedClient.NetworkId
})
};
#if DEBUG == true
var clientSql = iqClient.ToSql();
#endif
var foundClient = await iqClient.FirstOrDefaultAsync();
where _c.ClientId == entityID
select _c;
var client = await iqClient.FirstOrDefaultAsync();
var foundClient = new
{
Client = client,
LinkedAccounts = await context.Clients.Where(_client => _client.AliasLinkId == client.AliasLinkId)
.Select(_linkedClient => new
{
_linkedClient.ClientId,
_linkedClient.NetworkId
})
.ToListAsync()
};
if (foundClient == null)
{
@ -585,6 +585,7 @@ namespace SharedLibraryCore.Services
var iqClients = context.Clients
.Where(_client => _client.CurrentAlias.IPAddress != null)
.Where(_client => _client.FirstConnection >= startOfPeriod)
.OrderByDescending(_client => _client.FirstConnection)
.Select(_client => new PlayerInfo()
{
ClientId = _client.ClientId,
@ -592,6 +593,7 @@ namespace SharedLibraryCore.Services
IPAddress = _client.CurrentAlias.IPAddress.ConvertIPtoString(),
LastConnection = _client.FirstConnection
});
#if DEBUG
var sql = iqClients.ToSql();
#endif