Hi jipock,
Assuming that the entity type you are looking for is Employee, the Property is LastName, and you are validating only new entities:
protected override bool ValidateSave() {
var em = EntityManager;
var foundEntities = em.FindEntities(typeof(Employee), EntityState.Added);
foreach (Employee entity in foundEntities.Cast<Object>().ToList()) {
if (entity.LastName == null) {
em.RemoveEntity(entity);
}
return base.ValidateSave();
Note that, back in the client, while the successfully saved entities were updated to EntityState.Unchanged, the "unsaved" entities still have EntityState.Added.
Silvio.
Edited by sbelini - 08-Mar-2011 at 5:21pm