DocSpace-buildtools/common/ASC.Core.Common/EF/MigrationHistory.cs

14 lines
324 B
C#
Raw Normal View History

2022-02-15 11:52:43 +00:00
namespace ASC.Core.Common.EF;
[Singletone]
public class MigrationHistory
2021-10-12 09:04:24 +00:00
{
2022-02-15 11:52:43 +00:00
private readonly ConcurrentDictionary<Type, bool> _historyStore
= new ConcurrentDictionary<Type, bool>();
2021-10-12 09:04:24 +00:00
2022-02-15 11:52:43 +00:00
public bool TryAddMigratedContext(Type contextType)
{
return _historyStore.TryAdd(contextType, true);
2021-10-12 09:04:24 +00:00
}
}