示例#1
0
 public IGenericEFRepository <TEntity> Repository <TContext, TEntity>()
     where TContext : DbContext
     where TEntity : class
 {
     return((IGenericEFRepository <TEntity>)_repositories.GetOrAdd(
                typeof(TEntity),
                t => _repositoryFactory.Get <TEntity>(DbContexts.Get <TContext>())
                ));
 }