public ProjectionMapper(IContainer container, SqlDataReader reader, JsonSerializerSettings jsonSerializerSettings, RelationalMappings mappings) { _container = container; _mappings = mappings; _reader = reader; _jsonSerializerSettings = jsonSerializerSettings; }
public Transaction(IContainer container, string connectionString, IsolationLevel isolationLevel, JsonSerializerSettings jsonSerializerSettings, RelationalMappings mappings) { _jsonSerializerSettings = jsonSerializerSettings; _mappings = mappings; _connection = new SqlConnection(connectionString); _connection.Open(); _transaction = _connection.BeginTransaction(isolationLevel); CurrentTransactions.TryAdd(this, true); _container = container; }
public Store(IContainer container, IHomeConfiguration config, string connectionString, RelationalMappings mappings) { _container = container; _config = config; _mappings = mappings; _connectionString = SetConnectionStringOptions(connectionString); _jsonSettings.ContractResolver = new RelationalJsonContractResolver(mappings); _jsonSettings.Converters.Add(new StringEnumConverter()); _jsonSettings.Converters.Add(new VersionConverter()); _jsonSettings.DateFormatHandling = 0; _jsonSettings.DateTimeZoneHandling = (DateTimeZoneHandling)3; _jsonSettings.TypeNameHandling = (TypeNameHandling)4; _jsonSettings.TypeNameAssemblyFormat = FormatterAssemblyStyle.Simple; }
public static RelationalMappings CreateMappings() { RelationalMappings relationalMappings = new RelationalMappings(); List <EntityMapping> list = typeof(StoreFactory).Assembly.GetTypes().Where( type => typeof(EntityMapping).IsAssignableFrom(type)) .Where(type => { if (type.IsClass) { return(!type.IsAbstract && !type.ContainsGenericParameters); } return(false); }) .Select( type => Activator.CreateInstance(type) as EntityMapping) .ToList(); relationalMappings.Install(list); return(relationalMappings); }
public RelationalJsonContractResolver(RelationalMappings mappings) { _mappings = mappings; }