Tip 27 – How to Implement BeforeSave Validation

It is common to want to validate that your entities are ‘valid’ before you save them to the database. A naive form of validation might be to try to ensure that your entities are ‘valid’ before you add them to the context, but this doesn’t help you if you pass through ‘invalid’ states, i.e. as…


Intellisense : What properties are required?

Yesterday I was talking to a Simon, another super smart dev on the EF team, and he raised a big concern, one that I am sure you can all relate too: We’ve all seen something like this: And thought: “What is the bare minimum I can do here to save a Whatever?” This “What properties…


All the power at your disposal

I invite you to take a look at this forum post from ‘Benys’ It illustrates the power of the Entity Framework’s mapping capabilities + partial classes. The short answer to a lot of “Does the EF support … ?” type questions is often no.  Often however the longer answer, is a little easier to digest….