I'm new to Entity Framework, have read Julie Lerman book and lots of articles about it. Have new project that has both database and classes already defined, so have decided to use Code First approach (although it is the new project so database and classes are pretty similar).
So, we have: - database layer with entities, mapping and DbContext - classes (business layer) - WPF with MVVM (UI layer)
If I understand Code First properly, database layer references business layer, UI references both database and business layer. (If I try to add in the business layer reference to database layer, I get circular reference error.)
Basic validation, like required field or length I understand, but where to put additional (more complex) validations if business layer is not aware of database layer?
Thanks, Claire