Click here to Skip to main content
15,886,774 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
C#
public static Func<TAGEntities, BusinessAddress, CustomerMerchant, Customer, User, IQueryable<BaseBusinessAddressModel>> Getbusinessaddrequery =
             CompiledQuery.Compile<TAGEntities, BusinessAddress, CustomerMerchant, Customer, User, IQueryable<BaseBusinessAddressModel>>
{
                 (db, address, merchant, cus, user)=> (I had implement linqQuery)
}

I had used entityframework6.0 and .net framework 4.6
How to explictily convert TAGENtitiies to datacontext
Please help me.
Thank you.

What I have tried:

the type'TAGEntities' can not used as type parameter'targ0' in the generic type or method 'compiledQuery.compile'.There is no impliclty Conversion from 'TAGEntities' to'System.data.linq.DataContext
Posted
Updated 8-Sep-20 20:14pm
v2
Comments
Richard Deeming 9-Sep-20 4:23am    
REPOST
You have already posted this:
Type argument for method'compiler.compile' can not inferred from usage.try specfying the type argument explictily[^]

If you want to update your question to add missing information, click the green "Improve question" link and update your question.

Do not post the update as a "new" question.
Krishna Veni 9-Sep-20 4:32am    
That question is different.This also different but query same
F-ES Sitecore 9-Sep-20 6:34am    
It's expecting something that is a DataContext object as the first param, so whatever TAGEntities is, it's not a DataContext.
Krishna Veni 9-Sep-20 6:57am    
TAGEntities realted dbcontext.Is it working for above query

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900