Ejemplo n.º 1
0
        public List <T> GetAll <T>(Expression <Func <T, bool> > filter) where T : class, new()
        {
            lock (tableLocks[typeof(T)])
            {
                var result = connection.Table <T>().Where(filter).ToList();

                return(typeof(IEncryptable).IsAssignableFrom(typeof(T)) ?
                       SqliteEncryptHelper.DecryptList <T>(result) : result);
            }
        }
Ejemplo n.º 2
0
        public List <T> GetByQuery <T>(string query, params object[] args) where T : class, new()
        {
            lock (tableLocks[typeof(T)])
            {
                var result = connection.Query <T>(query, args);

                return(typeof(IEncryptable).IsAssignableFrom(typeof(T)) ?
                       SqliteEncryptHelper.DecryptList <T>(result) : result);
            }
        }