public IYafDatabase Get() { if (_database == null) { DataLoadOptions options = new DataLoadOptions(); //options.LoadWith<Tour>(tour => tour.Shows); //options.LoadWith<Show>(show => show.Sets); //options.LoadWith<Set>(set => set.SetSongs); //options.LoadWith<Set>(set => set.Show); //options.LoadWith<SetSong>(setSong => setSong.Song); //options.LoadWith<SetSong>(setSong => setSong.Set); //options.LoadWith<Song>(song => song.set _database = new YafDatabase(_connectionString) { LoadOptions = options, DeferredLoadingEnabled = true, Log = (_logWriter == null ? null : _logWriter.Get()) }; } return(_database); }
public IDatabase Get() { if (_database == null) { DataLoadOptions options = new DataLoadOptions(); //options.LoadWith<Show>(s => s.); _database = new Database(_connectionString) { LoadOptions = options, DeferredLoadingEnabled = true, Log = (_logWriter == null ? null : _logWriter.Get()) }; } return(_database); }
private int Test_Get_GetList(ILogWriter writer, int count) { Guid guid = Guid.NewGuid(); DateTime t1 = DateTime.Now; DateTime t2 = DateTime.Now; try { writer.Get <ExceptionInfo>(guid); } catch (NotImplementedException) { count++; } try { writer.GetList <ExceptionInfo>(t1, t2); } catch (NotImplementedException) { count++; } return(count); }