I am currently working my way through the MVC 3 book that imaginekitty recommended so, they use Entity Framework for a simple ecommerce build.
By the way, ORMs, data persistence and enterprise or n-tier architectures are a new frontier for me.
Serenarules, are you saying that the “completely detached view model” code that you highlighted is a process to use the Entity Framework for a domain driven design as opposed to an “anemic data model (seen frequently in EntityFramework apps)”? Would I be able to do a projection, sum, count, or special grouping in the detached model view?
You, personally, probably wouldn’t. But when you design software, one must be mindful that other developers may get their hands on it at some point. A modest amount of self-protection is advisable. Never trust the UI. What if the company you design a web app for, decides to have another coder write a reporting UI to supply new demands that your app did not. Can you trust that the intent of the domain will be respected? Maybe. But probably not. The better thing to do is make sure that domain model is encapsulated so that if something unexpected does happen in an upper layer, it won’t taint or currupt the underlying data.