Thread is closed for posting
4 posts, 0 answers
  1. S
    S avatar
    10 posts
    Member since:
    Nov 2013

    Posted 22 Jun 2015 Link to this post

    Line 1: var lstOldtp = GeneralAction.EM().Prospectoutlook_typeproperties.Where(p => p.ProspectOutlookClient_id == rtn);
    Line 2: if (lstOldtp.Count() > 0)
    Line 3: {
    Line 4:        var delstOld = lstOldtp.Where(m => !POClient_interest.Any(n => n.TypeProperty_id == m.TypeProperty_id));
    Line 5:         if (delstOld.Count() > 0)
    Line 6:              GeneralAction.DeleteRecords<DynamicDataControllerModel.Prospectoutlook_typeproperty>(delstOld,

    Line 7: GlobalEnum.CommitDatabase.FlushChanges);
    Line 8: }


    I got the error in when running Line 5

    The following message I got 

    System.NotSupportedException: An exception occurred during the execution of 'Extent<DynamicDataControllerModel.Prospectoutlook_typeproperty>().Where(p => (p.ProspectOutlookClient_id == value(FA.CRM.OutlookListing+<>c__DisplayClassb).rtn)).Where(m => Not(value(FA.CRM.OutlookListing+<>c__DisplayClassd).POClient_interest.Any(n => (n.TypeProperty_id == m.TypeProperty_id)))).Count()'. Failure: Execution of 'System.Linq.Enumerable:Any(IEnumerable`1,Func`2)' on the database server side currently not implemented.


    Is there anything wrong with the logic. I can't see it any place. Any idea or Alternative?


    Thank You,

  2. S
    S avatar
    10 posts
    Member since:
    Nov 2013

    Posted 22 Jun 2015 in reply to S Link to this post

    Thank You. I got it working now
  3. Morgan
    Morgan avatar
    15 posts
    Member since:
    Nov 2014

    Posted 28 Jul 2015 in reply to S Link to this post

    How did you get it working?  I am having the same problem with the .Any() in the following query.


    from i in dbContext.Interviews
        .Include(n => n.Notes)
        .Include(b => b.Bookmarks)
        .Include(u => u.User)
        .Include(r => r.InterviewRooms)
        .Where(i =>
            (i.InterviewRooms.Any(ir => roomIds.Any(ir.RoomId.ToString().Contains))
                || roomIds.Count == 0)
                || dates.Count() == 0))
        orderby i.WhenCreated descending
        select i;

  4. Viktor Zhivkov
    Viktor Zhivkov avatar
    324 posts

    Posted 31 Jul 2015 Link to this post

    Hello Morgan,

    I would like to continue our communication related to your query in the dedicated forum thread that you have posted.

    Viktor Zhivkov
    Check out the latest announcement about Telerik Data Access vNext as a powerful framework able to solve core development problems.
Back to Top