You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
906 B
43 lines
906 B
using System;
|
|
using EFLib;
|
|
using Model;
|
|
|
|
namespace DataManagers
|
|
{
|
|
public class DbDataManager : IDataManager
|
|
{
|
|
|
|
public LolContext Context { get; set; }
|
|
|
|
public IChampionsManager ChampionsMgr => new DbChampionManager(Context);
|
|
|
|
public ISkinsManager SkinsMgr => throw new NotImplementedException();
|
|
|
|
public IRunesManager RunesMgr => throw new NotImplementedException();
|
|
|
|
public IRunePagesManager RunePagesMgr => throw new NotImplementedException();
|
|
|
|
|
|
public DbDataManager(LolContext context)
|
|
{
|
|
Context = context;
|
|
}
|
|
|
|
public void Dispose()
|
|
{
|
|
Context.Dispose();
|
|
}
|
|
|
|
public void EnsureCreated()
|
|
{
|
|
Context.Database.EnsureCreated();
|
|
}
|
|
|
|
public async Task EnsureCreatedAsync()
|
|
{
|
|
await Context.Database.EnsureCreatedAsync();
|
|
}
|
|
}
|
|
}
|
|
|