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

20 lines
428 B
C#
Raw Normal View History

2021-10-22 10:08:09 +00:00
using System;
using System.Collections.Concurrent;
2021-10-12 09:04:24 +00:00
using ASC.Common;
namespace ASC.Core.Common.EF
{
[Singletone]
public class MigrationHistory
{
2021-10-22 10:08:09 +00:00
private ConcurrentDictionary<Type, bool> _historyStore
= new ConcurrentDictionary<Type, bool>();
2021-10-12 09:04:24 +00:00
2021-10-22 10:08:09 +00:00
public bool TryAddMigratedContext(Type contextType)
2021-10-12 09:04:24 +00:00
{
2021-10-22 10:08:09 +00:00
return _historyStore.TryAdd(contextType, true);
2021-10-12 09:04:24 +00:00
}
}
}