Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Tobias Klika 101 posts 570 karma points c-trib
    Feb 04, 2015 @ 12:20
    Tobias Klika
    0

    A lot SQL queries in Membership.GetUser

    Hi!

    When I am calling Membership.GetUser() once MiniProfiler reports a lot (28) SQL requests. Any idea what I am doing wrong or what I can do to prevent this?

    Seems a bit of an overkill doing this on every request (and for every page).

    PS. Same for Members.GetCurrentMemberProfileModel()

  • Alex Skrypnyk 6134 posts 23953 karma points MVP 8x admin c-trib
    Feb 04, 2015 @ 18:25
    Alex Skrypnyk
    0

    Hi Tobias,

    Yes, Membership.GetUser() is very expensive method for performance.

    MembershipHelper is much better in this sense.

    http://our.umbraco.org/documentation/Reference/Querying/MemberShipHelper/

    Thanks

Please Sign in or register to post replies

Write your reply to:

Draft