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.

RIA Domain service returns null although NHibernate DAL returns data -


hi i've got following method in nhibernate dal:

 public iqueryable<workcellloadgraphdata> getworkcellloadgraphdatabyid( string workcellid, datetime startdate, datetime enddate )     {         var workcellgraphdata = ( x in this.getsession().query<workcellloadgraphdata>()                   x.workcellid == workcellid && (x.fromtime >= startdate && x.fromtime <= enddate)                   select new                              {                                  x.workcellid,                                  x.calendarid,                                  x.fromtime,                                  x.durationinminutes                              });          return workcellgraphdata iqueryable<workcellloadgraphdata>;     } 

when put breakpoint on workcellgraphdata, collection of workcellgraphdata objects.

however, calling code, in ria domain service class, method is:

 public iqueryable<workcellloadgraphdata> getworkcellloadgraphdatabyid()     {                   iqueryable<workcellloadgraphdata> result = manufacturingdao.instance.getworkcellloadgraphdatabyid( "13", datetime.today, datetime.today.adddays( 14 ) );         return result;     } 

always returns null in "result". can spot why?

tia,

david

in linq, execution of query deferred until moment when request data. in first approach defining query, never executed; in second approach was, you needed enumerate results.


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 -