2017-10-17 06:00:27 +00:00
|
|
|
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
2017-10-17 07:02:13 +00:00
|
|
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
2017-10-17 06:00:27 +00:00
|
|
|
|
|
|
|
|
|
using osu.Framework.Platform;
|
|
|
|
|
|
|
|
|
|
namespace osu.Game.Database
|
|
|
|
|
{
|
|
|
|
|
public class DatabaseContextFactory
|
|
|
|
|
{
|
|
|
|
|
private readonly GameHost host;
|
|
|
|
|
|
|
|
|
|
public DatabaseContextFactory(GameHost host)
|
|
|
|
|
{
|
|
|
|
|
this.host = host;
|
|
|
|
|
}
|
|
|
|
|
|
2017-10-19 10:41:16 +00:00
|
|
|
|
public OsuDbContext GetContext() => new OsuDbContext(host.Storage.GetDatabaseConnectionString(@"client"));
|
2017-10-17 06:00:27 +00:00
|
|
|
|
}
|
|
|
|
|
}
|