This is a migrated thread and some comments may be shown as answers.

System.NotSupportedException

3 Answers 95 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
S
Top achievements
Rank 1
S asked on 23 Jun 2015, 01:53 AM

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,

3 Answers, 1 is accepted

Sort by
0
S
Top achievements
Rank 1
answered on 23 Jun 2015, 02:49 AM
Thank You. I got it working now
0
KenB
Top achievements
Rank 1
answered on 28 Jul 2015, 12:59 PM

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.Contains(i.WhenCreated.Date)
            || dates.Count() == 0))
    orderby i.WhenCreated descending
    select i;

0
Viktor Zhivkov
Telerik team
answered on 31 Jul 2015, 12:34 PM
Hello Morgan,

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

Regards,
Viktor Zhivkov
Telerik
 
Check out the latest announcement about Telerik Data Access vNext as a powerful framework able to solve core development problems.
Tags
General Discussions
Asked by
S
Top achievements
Rank 1
Answers by
S
Top achievements
Rank 1
KenB
Top achievements
Rank 1
Viktor Zhivkov
Telerik team
Share this question
or