ValidateEntities() public méthode

Validate all the entities in the saveMap.
Contains all the EntityErrors. Only thrown if throwIfInvalid is true.
public ValidateEntities ( Dictionary saveMap, bool throwIfInvalid ) : List
saveMap Dictionary Map of type to entities.
throwIfInvalid bool If true, throws an EntityErrorsException if any entity is invalid
Résultat List
Exemple #1
0
        protected override Dictionary<Type, List<EntityInfo>> BeforeSaveEntities(Dictionary<Type, List<EntityInfo>> saveMap) {
          var meta = this.GetMetadata();
          var bvalidator = new BreezeMetadataValidator(this, meta);
          bvalidator.ValidateEntities(saveMap, true);

          DataAnnotationsValidator.AddDescriptor(typeof(Customer), typeof(CustomerMetaData));
          var validator = new DataAnnotationsValidator(this);
          validator.ValidateEntities(saveMap, true);

          return base.BeforeSaveEntities(saveMap);
        }