1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-18 18:52:56 +08:00
osu-lazer/osu.Game/Database/SingletonContextFactory.cs
Dean Herbert 80806be047 Don't start transactions for migration
It looks like transactions are used internally during migration.
2018-05-29 16:23:38 +09:00

20 lines
595 B
C#

// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
namespace osu.Game.Database
{
public class SingletonContextFactory : IDatabaseContextFactory
{
private readonly OsuDbContext context;
public SingletonContextFactory(OsuDbContext context)
{
this.context = context;
}
public OsuDbContext Get() => context;
public DatabaseWriteUsage GetForWrite(bool withTransaction = true) => new DatabaseWriteUsage(context, null);
}
}