added MySQL support
fixed login bug IW3 official support
This commit is contained in:
@ -107,7 +107,7 @@ namespace SharedLibraryCore.Services
|
||||
{
|
||||
using (var context = new DatabaseContext())
|
||||
{
|
||||
return await new DatabaseContext().Clients
|
||||
return await context.Clients
|
||||
.AsNoTracking()
|
||||
.Include(c => c.CurrentAlias)
|
||||
.Include(c => c.AliasLink.Children)
|
||||
@ -216,7 +216,7 @@ namespace SharedLibraryCore.Services
|
||||
{
|
||||
using (var context = new DatabaseContext())
|
||||
{
|
||||
return await new DatabaseContext().Clients
|
||||
return await context.Clients
|
||||
.AsNoTracking()
|
||||
.Include(c => c.CurrentAlias)
|
||||
.Where(c => c.Level >= Player.Permission.Trusted)
|
||||
|
@ -15,6 +15,11 @@ namespace SharedLibraryCore.Services
|
||||
private dynamic _context;
|
||||
private DbSet<TEntity> _dbSet;
|
||||
|
||||
~GenericRepository()
|
||||
{
|
||||
_context.Dispose();
|
||||
}
|
||||
|
||||
protected DbContext Context
|
||||
{
|
||||
get
|
||||
|
Reference in New Issue
Block a user