Click here to Skip to main content
15,894,343 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Guys, i'm trying select from a model. but on transaction scope

C#
IEnumerable<T> Lista = null;
               using (var transactionScope = TransactionScopeControl.getTransactionScope())
               {
                   Lista = context.Set<T>().Where(expression).AsNoTracking(); // error is throw here.
                   transactionScope.Complete();
               }


The Error:
Method Not Found: 'System.Data.Entity.Core.Metadata.Edm.EdmModel System.Data.Entity.Infrastructure.DbModel.get_StoreModel()'.


Someone knows that reason?
Posted
Comments
virusstorm 30-Jun-15 15:02pm    
What version of EF are you using?
Maciej Los 30-Jun-15 16:45pm    
Based on this piece of code it's impossible to answer the question.
Nathan Minier 1-Jul-15 8:01am    
Are you trying to access an object whose type is not registered on the context, i.e. there is no corresponding DbSet<> for that type?

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