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.

WPF, WCF, Entity, MVVM doubts! -


i using wcf service reference in wpf project, , entity framework data model resides in wcf project.

and using mvvm light framework. doing following things:

  1. i use linq in service data , fetch wpf, obersvablecollections usually.
  2. everything works in view part populating datagrid, views required.

but have following doubts:

  1. is correct way of transferring data between wcf , wpf.
  2. i haven't used model yet, have doubt when use it?
  3. i wanted save data datagrid. able pass on observablecollection of updated data of datagrid service's function. how update entity collection? looping? doesnt sound right. once update entity collection able use savechanges update database.
  4. when need show hierarchal data in treeview, make data hierarichal, stored procedure xml? use view create grouping criteria column? create column in service? create column/property in presentation?

1 - there no correct way, depends on requirements , goals.

2 - mvvm, model should sit between wpf , database. means calls database should go through model, , writes database should go through model. wpf gui should bind model. means wpf portion consists of xaml code. code accesses database should in model.

there reasons separating this.

  • you can write unit tests on model.
  • the view model independent of gui. means can change gui dropping in different components , binding model.
  • a quick google search can yield more reasons.

3 - try send on entities have changed. can done passing collection view model, , have view model figure out has changed.

4 - don't quite understand want do. usually, make treeview, should create hierarchicaldatatemplate each of view models. treeview control take care of rest. should tutorials on one, because it's kinda hard wrap head around.


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 -