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
} // 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