示例#1
0
        public EnigmaContext(IEnigmaConnection engineConnection, bool ownsConnection)
        {
            _engineConnection = engineConnection;
            _ownsConnection = ownsConnection;

            _details = ReflectionManager.GetDetails(this.GetType(), model =>
            {
                OnModelCreating(new ModelBuilder(model));
                _engine = _engineConnection.CreateEngine(model);
                _engine.Synchronize();
            });
            if (_engine == null)
                _engine = _engineConnection.CreateEngine(_details.Model);

            _changeManager = new ChangeManager(_details.Model);
            InitializeSets();
        }
示例#2
0
 public EnigmaUnitOfWork(IEnigmaConnection connection)
 {
     _connection = connection;
 }
示例#3
0
 public EnigmaQueryExecutor(IEnigmaConnection connection)
 {
     _connection = connection;
 }
示例#4
0
 public EnigmaContext(IEnigmaConnection engineConnection)
     : this(engineConnection, false)
 {
 }