Added todo and renamed MemoryDatabase._idGenerators

pull/272/head
Halil İbrahim Kalkan 7 years ago
parent 15a10c0d09
commit be3afe8dd2

@ -16,6 +16,7 @@ namespace Volo.Abp.Identity.Web.Navigation
var permissionChecker = context.ServiceProvider.GetRequiredService<IPermissionChecker>();
//TODO: We should not add this if none of the children available. Alternatively, we can handle it on menu rendering (would be simpler).
var identityMenuItem = new ApplicationMenuItem("Identity", "Identity");
context.Menu.AddItem(identityMenuItem);

@ -8,12 +8,12 @@ namespace Volo.Abp.Domain.Repositories.MemoryDb
{
private readonly ConcurrentDictionary<Type, object> _sets;
private readonly ConcurrentDictionary<Type, InMemoryIdGenerator> _idGenerators;
private readonly ConcurrentDictionary<Type, InMemoryIdGenerator> _entityIdGenerators;
public MemoryDatabase()
{
_sets = new ConcurrentDictionary<Type, object>();
_idGenerators = new ConcurrentDictionary<Type, InMemoryIdGenerator>();
_entityIdGenerators = new ConcurrentDictionary<Type, InMemoryIdGenerator>();
}
public List<TEntity> Collection<TEntity>()
@ -23,7 +23,7 @@ namespace Volo.Abp.Domain.Repositories.MemoryDb
public TKey GenerateNextId<TEntity, TKey>()
{
return _idGenerators
return _entityIdGenerators
.GetOrAdd(typeof(TEntity), () => new InMemoryIdGenerator())
.GenerateNext<TKey>();
}

Loading…
Cancel
Save