public virtual async Task Execute <T, TResult>(QueryParametersScalar <T, TResult> parameters) { IList fromOe = await ExecuteOe <TResult>(parameters.RequestUri, false, 0).ConfigureAwait(false); ODataUri odataUri = ParseUri(parameters.RequestUri); IEdmModel dbEdmModel = TestHelper.GetEdmModel(DbEdmModel, odataUri.Path); Db.OeDataAdapter dbDataAdapter = DbEdmModel.GetDataAdapter(dbEdmModel.EntityContainer); IList fromDb; using (var dataContext = (DbContext)dbDataAdapter.CreateDataContext()) fromDb = TestHelper.ExecuteDb(dbDataAdapter.EntitySetAdapters, dataContext, parameters.Expression); Console.WriteLine(parameters.RequestUri); TestHelper.Compare(fromDb, fromOe, null); }
public virtual async Task Execute <T, TResult>(QueryParameters <T, TResult> parameters) { IList fromOe = await ExecuteOe <TResult>(parameters.RequestUri, parameters.NavigationNextLink, parameters.PageSize).ConfigureAwait(false); ODataUri odataUri = ParseUri(parameters.RequestUri); IEdmModel dbEdmModel = TestHelper.GetEdmModel(DbEdmModel, odataUri.Path); Db.OeDataAdapter dbDataAdapter = DbEdmModel.GetDataAdapter(dbEdmModel.EntityContainer); IList fromDb; IReadOnlyList <EfInclude> includes; using (var dataContext = (DbContext)dbDataAdapter.CreateDataContext()) fromDb = TestHelper.ExecuteDb(dbDataAdapter, dataContext, parameters.Expression, out includes); Console.WriteLine(parameters.RequestUri); TestHelper.Compare(fromDb, fromOe, includes); }