Пример #1
0
        private IEnumerable<IEnumerable> joinObjects; // Passed to fetch, received from Join method.



        internal Cursor(IEnumerable<Criterion> criteria,
            Func<Cursor<T>, IEnumerable<IEnumerable>, IEnumerable<T>> fetchFunc,
            NRepository repository) {
            if (fetchFunc == null)
                throw new ArgumentNullException("fetchFunc", "The fetchFunc parameter is null.");

            CursorData.criteria = criteria;
            this.fetch = fetchFunc;
            this.repository = repository;
        } // end constructor
Пример #2
0
        } // end method



        public static NRepository Create<T>(string connectionString) where T : IDbConnection, new() {
            var repo = new NRepository(() => { return DataTool.OpenConnection<T>(connectionString); });
            repo.ConnectionString = connectionString;
            return repo;
        } // end method