Dependency Upgrades

This commit is contained in:
runebaas 2020-06-01 02:16:29 +02:00
parent ff968a490f
commit 3108a68407
No known key found for this signature in database
GPG key ID: 2677AF508D0300D6
5 changed files with 32 additions and 19 deletions

View file

@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using Microsoft.EntityFrameworkCore;
@ -13,5 +14,15 @@ namespace Geekbot.net.Lib.Extensions
var exists = predicate != null ? dbSet.Any(predicate) : dbSet.Any();
return !exists ? dbSet.Add(entity) : null;
}
// https://github.com/dotnet/efcore/issues/18124
public static IAsyncEnumerable<TEntity> AsAsyncEnumerable<TEntity>(this Microsoft.EntityFrameworkCore.DbSet<TEntity> obj) where TEntity : class
{
return Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.AsAsyncEnumerable(obj);
}
public static IQueryable<TEntity> Where<TEntity>(this Microsoft.EntityFrameworkCore.DbSet<TEntity> obj, System.Linq.Expressions.Expression<Func<TEntity, bool>> predicate) where TEntity : class
{
return System.Linq.Queryable.Where(obj, predicate);
}
}
}

View file

@ -1,4 +1,5 @@
using System;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Discord;
@ -11,6 +12,7 @@ namespace Geekbot.net.Lib.Polyfills
public string Mention { get; set; }
public IActivity Activity { get; }
public UserStatus Status { get; set; }
public IImmutableSet<ClientType> ActiveClients { get; }
public string AvatarId { get; set; }
public string Discriminator { get; set; }
public ushort DiscriminatorValue { get; set; }