Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

c# - Where is EntitySet<T>'s "Results View"? -


when looking @ linked entityset<t> of linq sql mapped entity, see following:

entityset debug view

i'd see following (achieved using .asqueryable() extension method) can click little refresh icon , see content:

alt text

why can't see results view on regular plain entityset<t>?

also, i've noticed on this msdn page says:

in linq sql, entityset<tentity> class implements iqueryable interface.

from can see, entityset<tentity> doesn't inherit either iqueryable nor iqueryable<t>. what's claim?

you'll find answer question

the results view works collections meet following conditions

  1. implement ienumerable or ienumerable (vb.net works ienumerable)
  2. do not implement ilist, ilist, icollection or icollection (c# restriction only)
  3. do not have debuggertypeproxy attribute
  4. system.core.dll loaded in debugee process

in particular #2, entityset<t> implement's ilist<t> therefore debugger won't show "results view" option.

using asqueryable extension method returns object implements iqueryable , ienumerable , therefore show "results view" option.

you can read more #2 in answer given in other question.


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -