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.

domain driven design - EAV within entity framework 4 and ddd -


some tables in database designed using eav concept. use entities auto generated , represent "static" tables (not "eav" tables) orm entity framework ddd objects.

  1. how can use "eav" entities in object model (not in relational in database) using entity framework?

for example,
in database have static table report , eav tables me store reportproperty report.
in domain model want have report that:

report {      icollection<reportproperty> reportproperties{get;set;} } 

i can use report entity generated entity framework , in partial section realise logic in getter retrieving data eav tables fill collection reportproperies. begs next question.

  1. what can if decide use nhibernate instead entity framework, because can`t use partial section realize using entity framework?

if use ddd objects, can use entity framework or nhibernate, hardly me, because need call mapping procedures in each procedures in dao.

eav concept of data access layer, while ddd concept of business logic layer. orm entity framework or nhibernate tempt mix both layers, in complex projects complex logic (that ddd needed) should never happen. divide dal , bll. use hand crafted classes ddd objects , use auto generated (or code first) classes entity framework , provide mapping layer between them. eav implementation detail of dal. bll , ddd classes wil not have change, if switch nhibernate. mapping layer would. , way, use dependency inversion. make dal depend on bll , not other way around. if make mapping layer physically separate entity framework parts, use mediator pattern on assembly level (meaning mapping layer depends on bll , dal , not other way 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 -