Microsoft
Software
Hardware
Network
Question : Updating with Entity Framewokr
I am in the process of building a DAL and BLL using Entity Framework. I have a couple of hopefully trivial questions.
Firstly to fill in on my situation, I want to use the EF as a DAL with a set of BLL classes to query the DAL. I want to use the BLL classes to handle CRUD instructions to the DAL/EF. Each entity has a corresponding BLL class which deals with the CRUD operations and passes the appropriate instructions to the DAL/EF.
1. Validation
Where should the validation for entity objects go? I could validate in the BLL or I could validate in EF partial classes. It seems I can add a "onpropertychanging" function in the partial class for each field - is there a "OnEntityChanged" event where I can deal with everything instead of having a separate function for each field?
2. Entered Date / Updated Date
Most tables in my database and thus entities have an "entered date" and "updated date" field. This is NOT for concurrency (a timestamp field handles this) but is for tracking users behaviour.
I would prefer to set these fields in one place, ideally somewhere in the object context or similar rather than coding it for each entity. I could derive each BLL class from a "base" BLL class and do this there but I would like to know all the options.
Thanks in advance.
Answer : Updating with Entity Framewokr
sure, that should work, however which aspects of SBS do you use? there is more to it if you do exchange as well, sharepoint etc etc.
Random Solutions
Web Service limits
Registration/Evaluation ESxi 3.5 & Client Infrastructure
How to best deal with a Filemaker dinosaur?
Is it possible to apply style, such as bold or color, to a single line in TMemo1 control?
Quoting array names in Associative Arrays in PHP in assignment and echo statements.
Public Folder "Pretty" names not showing up in GAL
SWF object with FLVPlayback component
How to remove new line from a string
XPages: can't get a simple dialog box working
Working with multiple MS SQL Server database in applicatie