예제 #1
0
        public OeParser CreateParser(String request, OeModelBoundProvider modelBoundProvider)
        {
            ODataUri  odataUri = ParseUri(request);
            IEdmModel edmModel = OeEdmModel.GetEdmModel(odataUri.Path);

            return(new OeParser(odataUri.ServiceRoot, edmModel, modelBoundProvider, ServiceProvider));
        }
예제 #2
0
        public override OrderContext CreateContext()
        {
            Db.OeDataAdapter dataAdapter = OeEdmModel.GetDataAdapter(OeEdmModel.EntityContainer);
            var dbContext = (DbContext)dataAdapter.CreateDataContext();

            try
            {
                DbContextOptions options = TestHelper.CreateOptions <OrderContext>(dbContext);
                return(new OrderContext(options));
            }
            finally
            {
                dataAdapter.CloseDataContext(dbContext);
            }
        }