ADO.NET Entity Framework 4.3 for Real Web Applications
- Date: June 14, 2012 from 1:00PM to 2:15PM
- Day 4
- DEV215
- Speakers: Adam Tuliper
- 11,740 Views
- 2 Comments
Loading User Information from Channel 9
Something went wrong getting user information from Channel 9
Loading User Information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
Right click “Save as…”
Slides (view online)Already have a Channel 9 account? Please sign in
Follow the Discussion
Adam,
So, when you use fluent API validations, you are using EF validations, then you are bringing some domain concern to your data acces layer, don't you agree?
Your validation can be kept in separate classes, so not entirely. Validation is often tied to your domain AND your data. Are you going to only have business validation that isn't duplicated in any way in your database? Not likely otherwise you aren't giving nice messages to your users. By the nature of development with db, you have validation rules in your db and your objects that at times duplicate so your domain concerns are really data concerns here that normally make it into the domain as it is.
If you choose to go with another technology swap out your validation layer. You need some way to tie your validation to the user and/or db as it is, so changing a technology is going to result in some validation related refactoring anyways.
In the case of EF, you are saying: 'ok, Im getting advantages of having integrated stack for MVC/Web Forms validation coupled with code first if I want it' all while having your validation in separate classes than you pocos, so its easily swapped as well if you choose a different validation mechanism.
Remove this comment
Remove this thread
close