/// <summary> /// Create an an IDataSource of the appropriate type with appropriate lifetime, with option for this to /// for returning summaries instead of fully hydrated records /// </summary> /// <param name="forSummaries">Whether the data source should return summaries instead of fully hydrated records</param> /// <returns>The IDataSource persistence service instance</returns> public IDataSource Create(bool forSummaries) { var ds = new CoreDataSource(ContextLifetimeMode, forSummaries); if (!string.IsNullOrEmpty(DataSourceSpecifier)) ds.DataSourceSpecifier = this.DataSourceSpecifier; if (QueryTimeoutSecs.HasValue) ds.QueryTimeoutSecs = this.QueryTimeoutSecs; return ds; }
/// <summary> /// Create an an IDataSource of the appropriate type with appropriate lifetime, with option for this to /// for returning summaries instead of fully hydrated records /// </summary> /// <param name="forSummaries">Whether the data source should return summaries instead of fully hydrated records</param> /// <returns>The IDataSource persistence service instance</returns> public IDataSource Create(bool forSummaries) { var ds = new CoreDataSource(ContextLifetimeMode, forSummaries); if (!string.IsNullOrEmpty(DataSourceSpecifier)) { ds.DataSourceSpecifier = this.DataSourceSpecifier; } if (QueryTimeoutSecs.HasValue) { ds.QueryTimeoutSecs = this.QueryTimeoutSecs; } return(ds); }