Exemplo n.º 1
0
 public DatabaseContext(DatabaseContextOptions options)
 {
     options_               = options;
     modelDataStorage_      = new ModelDataStorage <Type>();
     dbQueryTranslator_     = new DatabaseCreationQueryTranslator(modelDataStorage_);
     constraintTranslator_  = new ConstraintTranslator(options);
     dbTableToPropertyName_ = new Dictionary <Type, string>();
     stateManager_          = new StateManager(modelDataStorage_);
     database_              = new SqlDatabase(new SqlEntityDeserializer(modelDataStorage_, stateManager_), options_.ConnectionString);
     tableNameProvider_     = new TableNameProvider();
     changeDetector_        = new ChangeDetector(tableNameProvider_, modelDataStorage_);
     updateQueryTranslator_ = new UpdateQueryTranslator(new WhereQueryTranslator());
 }
Exemplo n.º 2
0
 public EntityPropertyBuilder(IModelDataStorage <Type> storage)
 {
     storage_ = storage;
 }
Exemplo n.º 3
0
 public EntityBuilder(IModelDataStorage <Type> storage)
 {
     storage_ = storage;
     entityRelationshipFactory_ = new EntityRelationshipFactory();
     entityPropertyBuilder_     = new EntityPropertyBuilder <TEntity>(storage_);
 }
Exemplo n.º 4
0
 public SqlEntityDeserializer(IModelDataStorage <Type> modelDataStorage, IStateManager stateManager)
 {
     modelDataStorage_ = modelDataStorage;
     stateManager_     = stateManager;
 }
Exemplo n.º 5
0
 public StateManager(IModelDataStorage <Type> modelDataStorage)
 {
     trackedEntities_   = new Dictionary <(Type, string), IInternalEntity <object> >();
     modelDataStorage_  = modelDataStorage;
     entitiesToBeAdded_ = new Queue <IInternalEntity <object> >();
 }
Exemplo n.º 6
0
 public EntityDataBuilder(IModelDataStorage <Type> storage, IEntityRelationship relationship)
 {
     storage_      = storage;
     relationship_ = relationship;
 }
Exemplo n.º 7
0
 public EntityNavigationBuilder(IModelDataStorage <Type> storage)
 {
     storage_ = storage;
     entityRelationshipFactory_ = new EntityRelationshipFactory();
 }
Exemplo n.º 8
0
 public ModelBuilder(IModelDataStorage <Type> storage)
 {
     storage_ = storage;
 }
 public EntityPropertyOptionsBuilder(IModelDataStorage <Type> storage, PropertyInfo property)
 {
     storage_      = storage;
     propertyInfo_ = property;
 }
Exemplo n.º 10
0
 public ChangeDetector(ITableNameProvider tableNameProvider, IModelDataStorage <Type> modelDataStorage)
 {
     tableNameProvider_ = tableNameProvider;
     modelDataStorage_  = modelDataStorage;
 }
Exemplo n.º 11
0
 public DatabaseCreationQueryTranslator(IModelDataStorage <Type> modelDataStorage)
 {
     modelDataStorage_ = modelDataStorage;
 }