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
Shared calendar does not show appointments until refreshed
How to find CD Burning folder path in c# and operating system as a XP?
printmig.exe aborting early
copy a defined user profile when user logs on domain for first time. Giving identical initial profile at logon. Each user can then modify this profile as required. over time keeping settings
Doing an INSERT or Update based on if the record already exists or not while importing data from a text file to SQL SERVER 2005.
Critera Help for query in access if a field is null then ignore crireria
xp sp2 clients wont log or ping server 2003
Change primary smtp addresses for 29 users using powershell for exchange
easy transfer software xp to xp
VS2008 - Help with preferences