2022-01-26 10:43:08 +00:00
|
|
|
|
namespace ASC.Core.Common.EF
|
2021-10-12 09:04:24 +00:00
|
|
|
|
{
|
|
|
|
|
[Singletone]
|
|
|
|
|
public class MigrationHistory
|
|
|
|
|
{
|
2022-02-14 21:02:57 +00:00
|
|
|
|
private readonly ConcurrentDictionary<Type, bool> _historyStore
|
2021-10-22 10:08:09 +00:00
|
|
|
|
= 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
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|