示例#1
0
        private IKeyGenerator <long> CreateKeyGenerator(string entityName)
        {
            var entityConfig = _config.GetEntityConfig(entityName);
            var repository   = _repositoryFactory.GetRepository(entityName, _config);

            return(new HiLoGenerator(repository, entityConfig.MaxLo));
        }
示例#2
0
        private IKeyGenerator <long> CreateKeyGenerator(string entityName)
        {
            var entityConfig = _config.GetEntityConfig(entityName);

            return(new HiLoGenerator(_repositoryFactory.GetRepository(entityName, _config), entityConfig != null ? entityConfig.MaxLo : _config.DefaultMaxLo));
        }