Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why this query just select everything from the Countries
Message
 
 
À
21/10/2016 08:34:24
Information générale
Forum:
ASP.NET
Catégorie:
Entity Framework
Versions des environnements
Environment:
C# 5.0
OS:
Windows 10
Database:
MS SQL Server
Divers
Thread ID:
01642163
Message ID:
01642231
Vues:
29
>>>What's GetAll() ?
>>>
>>I got pointed out to this thread
>>http://stackoverflow.com/questions/16530959/entity-framework-5-get-all-method
>>
>>It was
>>
>>IEnumerable <T> GetAll()
>>         {
>>             return _dbSet;
>>        }
>>
>>I've just changed it to IQueryable in the base classes. Now I'll have to fix all application errors due to this change.
>
>Changing to IQueryable should fix your problem - shouldn't think you'll find many side effects

Hi Viv,

I was discussing this same problem here

https://social.msdn.microsoft.com/Forums/en-US/b0b5ba30-0700-4bcc-97f9-1c55a293f333/ef-and-sql?forum=transactsql

Do you think my last suggestion will work? Because if I just attempt to change, I got too many errors.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform