Copied to clipboard

Flag this post as spam?

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


  • Arno L. Kristiansen 43 posts 63 karma points
    Feb 27, 2012 @ 21:38
    Arno L. Kristiansen
    0

    Alternativ to using Linq ??

    Hi 

    we have an intranet solution using Umbraco 4.5.2 ..

    Inside this site we are using some Linq sql to get data from the content..

    here is teh exampel :

    var nyheder = from n in db.Nyheds

                                  where n.VisIAfdelinger.Contains(AfdelingerID.ToString())

                                  orderby n.ForceFrontPage descending, n.UpdateDate descending //n.CreateDate descending

                                  select n;

     

                    return nyheder.ToList();

    My problem is that the decending in the Linq Sql makes the whole site really slow !! is there an alternativ to this LinqSql ??

    Can I get the data from the database and then sort it afterwards ?? 

    Hope somebody can help me !!

    /arno

  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    Feb 28, 2012 @ 06:41
    Jeroen Breuer
    0

    There are many sort of ways to get data. Looks like you've got some custom tables which you want to get the data from. The query doesn't look very heavy so not really sure why it's so slow. Is always use LLBLGen to query my custom tables, but you can also try the EntityFramework to get your data. Maybe first simply write the query in sql server and try to get the execute time in there.

    Jeroen

Please Sign in or register to post replies

Write your reply to:

Draft