Click here to Skip to main content
15,892,222 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionEntity Framework: How to pass column name dynamically to where clause Pin
Mou_kol10-Feb-18 9:05
Mou_kol10-Feb-18 9:05 
AnswerRe: Entity Framework: How to pass column name dynamically to where clause Pin
Maciej Los11-Feb-18 0:37
mveMaciej Los11-Feb-18 0:37 
PraiseRe: Entity Framework: How to pass column name dynamically to where clause Pin
Mou_kol11-Feb-18 7:42
Mou_kol11-Feb-18 7:42 
GeneralRe: Entity Framework: How to pass column name dynamically to where clause Pin
Maciej Los11-Feb-18 8:23
mveMaciej Los11-Feb-18 8:23 
QuestionWhy people use .AsEnumerable() along with EF query Pin
Mou_kol10-Feb-18 6:25
Mou_kol10-Feb-18 6:25 
AnswerRe: Why people use .AsEnumerable() along with EF query Pin
User 418025411-Feb-18 3:27
User 418025411-Feb-18 3:27 
GeneralRe: Why people use .AsEnumerable() along with EF query Pin
Mou_kol11-Feb-18 7:44
Mou_kol11-Feb-18 7:44 
AnswerRe: Why people use .AsEnumerable() along with EF query Pin
Nathan Minier12-Feb-18 1:46
professionalNathan Minier12-Feb-18 1:46 
This is one of those places where the documentation can be invaluable. The answer to your question lies in the Enumerable.AsEnumerable(TSource) Method documentation in the remarks area.


...the AsEnumerable<TSource> method can be used to hide the custom methods and instead make the standard query operators available.


So, in your snippet the coder wants to make sure that the IEnumerable.Select method is called rather than any other method named "Select" on the object. This is generally to provide compile-time safety to code where ambiguities might crop up. You see this sort of sanity check a lot in code that will accept dynamics or generics.

As to your second question: always use ToArray() for immutable collections. It has less overhead and is generally more efficient if you're providing collections that won't be modified (add or remove items) later within your application.
"There are three kinds of lies: lies, damned lies and statistics."
- Benjamin Disraeli

QuestionAzure csv radgrid dataset bind attempt Pin
jsegreti10-Feb-18 4:39
jsegreti10-Feb-18 4:39 
QuestionAdd a Nuget Package Using dotnet add Pin
Priyanka Kale9-Feb-18 21:43
Priyanka Kale9-Feb-18 21:43 
AnswerRe: Add a Nuget Package Using dotnet add Pin
User 418025411-Feb-18 3:22
User 418025411-Feb-18 3:22 
QuestionVSOT vb.net Pin
kumardm93289-Feb-18 15:45
kumardm93289-Feb-18 15:45 
AnswerRe: VSOT vb.net Pin
User 41802549-Feb-18 16:56
User 41802549-Feb-18 16:56 
GeneralRe: VSOT vb.net Pin
kumardm93289-Feb-18 17:40
kumardm93289-Feb-18 17:40 
AnswerRe: VSOT vb.net Pin
Richard Deeming12-Feb-18 9:08
mveRichard Deeming12-Feb-18 9:08 
QuestionVideo hosting on asp.net MVC application Pin
User 41802549-Feb-18 11:29
User 41802549-Feb-18 11:29 
QuestionDashboard Build in .net with Bootstrap Pin
RekhaDhankhar9-Feb-18 6:13
RekhaDhankhar9-Feb-18 6:13 
AnswerRe: Dashboard Build in .net with Bootstrap Pin
User 41802549-Feb-18 12:33
User 41802549-Feb-18 12:33 
QuestionAspects Every ASP.Net Developers Must Know Pin
Priyanka Kale8-Feb-18 23:40
Priyanka Kale8-Feb-18 23:40 
AnswerRe: Aspects Every ASP.Net Developers Must Know Pin
User 418025411-Feb-18 3:28
User 418025411-Feb-18 3:28 
GeneralRe: Aspects Every ASP.Net Developers Must Know Pin
Priyanka Kale14-Mar-18 20:00
Priyanka Kale14-Mar-18 20:00 
QuestionASP.Net MVC application is saying build failed but doesn't show me any error but warns "Found conflicts between different versions of the same dependent assembly" Pin
indian1438-Feb-18 13:24
indian1438-Feb-18 13:24 
QuestionShopping site based on sql data? Pin
JoeJack03308-Feb-18 10:01
JoeJack03308-Feb-18 10:01 
AnswerRe: Shopping site based on sql data? Pin
David Mujica9-Feb-18 3:53
David Mujica9-Feb-18 3:53 
QuestionEF: How to minimize search code Pin
Mou_kol8-Feb-18 1:53
Mou_kol8-Feb-18 1:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.