The best option for us would be to find the problem (assuming there is one),
not to work around it :)

On Wed, Nov 19, 2008 at 17:42, Andrus <[EMAIL PROTECTED]> wrote:

>
> Can you cache manually:
>
> List<Slot>  cachedSlot;
>
>  public List<Slot> GetWarehouseSlotDetails(WarehouseStation
> warehouseStation) {
> if (cachedSlot==null)
>   cachedslot = CreateGetWarehouseSlotDetails( warehouseStation);
>  return cachedslot;
> }
>
>  public List<Slot> CreateGetWarehouseSlotDetails(WarehouseStation
>  warehouseStation)
>        {
>                var slots = from ps in SchemaModel.PickSlot
>                            where ps.StationID ==
>  warehouseStation.Id.Value
>                            join s in SchemaModel.SkU on ps.SkUID
>  equals s.SkUID into tmpProductSlot
>                            from subsku in
>  tmpProductSlot.DefaultIfEmpty()
>                            select new
>                                       {
>                                           ps.PickSlotID,
>                                           subsku.Description
>                                       };
>  }
>
>
> ----- Original Message -----
> From: "Jimbo1982" <[EMAIL PROTECTED]>
> To: "DbLinq" <[email protected]>
> Sent: Wednesday, November 19, 2008 5:56 PM
> Subject: Re: Build Expression Query very slow
>
>
> >
> > The linq expression is in a method of a class which has access to a
> > single model of my database schema (I believe that is what you mean
> > from DataContext).
> >
> > The method is called each time with a different input, which
> > represents the element for the where clause of the select.
> >
> > Simplified method:
> >
> > public List<Slot> GetWarehouseSlotDetails(WarehouseStation
> > warehouseStation)
> >        {
> >                var slots = from ps in SchemaModel.PickSlot
> >                            where ps.StationID ==
> > warehouseStation.Id.Value
> >                            join s in SchemaModel.SkU on ps.SkUID
> > equals s.SkUID into tmpProductSlot
> >                            from subsku in
> > tmpProductSlot.DefaultIfEmpty()
> >                            select new
> >                                       {
> >                                           ps.PickSlotID,
> >                                           subsku.Description
> >                                       };
> > }
> >
> > Thank you,
> >
> > James
> > >
>
>
> >
>


-- 
Pascal.

jabber/gtalk: [EMAIL PROTECTED]
msn: [EMAIL PROTECTED]

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DbLinq" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/dblinq?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to