public void Terminate(IOrmSession session, bool isSuccessfully)
        {
            if (session == null) throw new ArgumentNullException("session");

            session.Dispose();
            Dispose();
        }
Exemplo n.º 2
0
 protected BaseRepository(string tableName, IOrmSession ormSession, ICurrentUser <TID> currentUser)
 {
     this.TableName = tableName;
     if (ormSession is MySqlSession)
     {
         this.SessionType = SessionType.MySql;
     }
     else if (ormSession is SQLiteSession)
     {
         this.SessionType = SessionType.SQLite;
     }
     else
     {
         this.SessionType = SessionType.Unknown;
     }
     this.UnitOfWork  = ormSession.UnitOfWork;
     this.CurrentUser = currentUser;
 }
Exemplo n.º 3
0
 public AppRespository(string tableName, IOrmSession ormSession, ICurrentUser <Guid> currentUser)
     : base(tableName, ormSession, currentUser)
 {
 }
Exemplo n.º 4
0
 public FewBoxRepository(IOrmSession ormSession, ICurrentUser <Guid> currentUser)
     : base("fb", ormSession, currentUser)
 {
 }
 public TransactionAsyncFilter(IOrmSession ormSession)
 {
     this.OrmSession = ormSession;
 }
Exemplo n.º 6
0
 protected void OnSetUp()
 {
     source = Guid.NewGuid().ToString();
     session = Substitute.For<IOrmSession>();
     InternalEnvironment.RegisterDataSource(new DataSource(source, il => session));
 }
Exemplo n.º 7
0
 public AppRepository(IOrmSession ormSession, ICurrentUser <Guid> currentUser)
     : base("app", ormSession, currentUser)
 {
 }
 public TraceLogRepository(IOrmSession ormSession, ICurrentUser <Guid> currentUser)
     : base("tracelog", ormSession, currentUser)
 {
 }
Exemplo n.º 9
0
 protected Repository(string tableName, IOrmSession ormSession, ICurrentUser <Guid> currentUser) : base(tableName, ormSession, currentUser)
 {
 }
 public ExceptionLogRepository(IOrmSession ormSession, ICurrentUser <Guid> currentUser)
     : base("exceptionlog", ormSession, currentUser)
 {
 }