public SmartSqlMapper(SmartSqlOptions options) { SmartSqlOptions = options; SmartSqlOptions.Setup(); _logger = LoggerFactory.CreateLogger <SmartSqlMapper>(); _dataReaderDeserializer = DeserializerFactory.Create(); NestedObjectConvertFactory convertFactory = new NestedObjectConvertFactory(); _nestedObjectConverter = new NestedObjectConverter(convertFactory); }
public ISmartSqlMapper GetSqlMapper(SmartSqlOptions smartSqlOptions) { if (!_mapperContainer.ContainsKey(smartSqlOptions.ConfigPath)) { lock (syncRoot) { if (!_mapperContainer.ContainsKey(smartSqlOptions.ConfigPath)) { ISmartSqlMapper _mapper = new SmartSqlMapper(smartSqlOptions); _mapperContainer.Add(smartSqlOptions.ConfigPath, _mapper); } } } return(_mapperContainer[smartSqlOptions.ConfigPath]); }
public ISmartSqlMapper GetSqlMapper(SmartSqlOptions smartSqlOptions) { if (String.IsNullOrEmpty(smartSqlOptions.Alias)) { smartSqlOptions.Alias = smartSqlOptions.ConfigPath; } if (!_mapperContainer.ContainsKey(smartSqlOptions.Alias)) { lock (this) { if (!_mapperContainer.ContainsKey(smartSqlOptions.Alias)) { ISmartSqlMapper _mapper = new SmartSqlMapper(smartSqlOptions); _mapperContainer.Add(smartSqlOptions.Alias, _mapper); } } } return(_mapperContainer[smartSqlOptions.Alias]); }
public SmartSqlMapper(SmartSqlOptions options) { _smartSqlOptions = options; _smartSqlOptions.Setup(); _logger = LoggerFactory.CreateLogger <SmartSqlMapper>(); }