Advice on POCO Validation with ASP.NET MVC/Entity Framework
问题 Here's the scenario: ASP.NET MVC2 Web Application Entity Framework 4 (Pure POCO's, Custom Data Context) Repository Pattern Unit of Work Pattern Dependency Injection Service Layer mediating Controller -> Repository So basically, all the cool stuff. :) Flow of events for a basic UI operation ("Adding a Post"): Controller calls Add(Post) method on service layer Service layer calls Add(T) on repository Repository calls AddObject(T) on custom data context Controller calls Commit() on Unit of Work