Ticket T623178
Visible to All Users

XtraReports using Entity Framework

created 7 years ago

Hi,

I have a Report that is wired up using the built in Entity Framework and bindings as follows :-

DevExpress.DataAccess.EntityFramework.EFConnectionParameters efConnectionParameters1 = new DevExpress.DataAccess.EntityFramework.EFConnectionParameters();
efConnectionParameters1.Source = typeof( ConnectReportDBContext );

efDataSource1 = new DevExpress.DataAccess.EntityFramework.EFDataSource( efConnectionParameters1 );

I would like to turn on AsNoTracking to help improve performance.

Is this possible?

Thanks,

Daniel.

Comments (1)
Yaroslav (DevExpress Support) 7 years ago

    Hi Daniel,

    Please give us additional time to research this question. We will update this thread as soon as possible.

    Thanks,
    Yaroslav

    Answers approved by DevExpress Support

    created 7 years ago

    Hi Daniel,
    Upon research, we found no way to disable the tracking option for the queries created internally issued by our EFDataSource component. This possibility is only available for EF Core, as it allows handling those settings at the DBContext level:

    C#
    DBContext.ChangeTracker.QueryTrackingBehavior = QueryTrackingBehavior.NoTracking;

    Considering this, we've decided to include this support in future versions of our component. Note that this support will be optional since AsNoTracking() has its own downsides:  Entity Framework merge option not tracking bad performance | StackOverflow. Note that right now there is no day established, but I can say for sure it won't be possible to propagate the required changes to the version you're currently using (15.2). If you're not planning to update any time soon, I'd recommend replacing the EFDataSource component with ObjectDataSource and doing a LINQ query manually: Bind a Report to an Object Data Source
    I hope it helps.

    Regards,
    Yaroslav

      Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

      Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.