none
Where clause proble in LINQ . same query working in some systems in some systems not working.. RRS feed

  • Question

  • HI
    Anybody please help me. I have a query below this code working in some systems but not working in some systems. what is the cause . We are using Vista OS and and same .net framework bcz of same company and same browser (IE8).

    LinkedList

     

    <DataResources> resources = GetResourceData(RESOURCE_TYPE.CUSTOMERS, userID, entID, uType);

     

    var resQ = from cust in dataContext.CUSTOMERs.ToList<ASonicCSP.Data.CUSTOMER>()

     

    join r in resources on new { ItemCode = cust.CUSTOMER_CODE } equals new { r.ItemCode }

     

    where cust.ENTERPRISEID == entID

     

    select cust;

    Below code working in remaing system which not working with above code. The only difference above and below query is where clause check bold text.
    But i couldn't find where exactly happing like this and i couldn't change all places like this bcz project is almost 90% completed. Its urgent for me. Anybody please update me solution for this without changing qurries in all places..

    LinkedList

     

    <DataResources> resources = GetResourceData(RESOURCE_TYPE.CUSTOMERS, userID, entID, uType);

     

    var resQ = from cust in dataContext.CUSTOMERs.Where(exp => exp.ENTERPRISEID == entID).ToList<ASonicCSP.Data.CUSTOMER>()

     

    join r in resources on new { ItemCode = cust.CUSTOMER_CODE } equals new { r.ItemCode }

     

     

    select cust;

    But i don not know exact difference of above 2 senories of using where . means which scenario have to use top method and which scenario have to use 2nd method. Please clarify this one also.

    Thanks as advance.


    i am software engineer
    Monday, March 8, 2010 7:29 AM

All replies