예제 #1
0
 public EntitySchema(string entityName, IEnumerable <EntityAttribute> attributes, [NotNull] string idAttributeName, Boolean excludeUndeclaredAttributes,
                     Boolean excludeUndeclaredAssociations, string whereClause, string parentEntity, bool includeRowstamp = true)
 {
     if (idAttributeName == null)
     {
         throw new ArgumentNullException("idAttributeName");
     }
     EntityName  = entityName;
     _attributes = attributes == null ? new HashSet <EntityAttribute>() : new HashSet <EntityAttribute>(attributes);
     if (includeRowstamp)
     {
         _rowstampAttribute = RowStampUtil.RowstampEntityAttribute();
         _attributes.Add(_rowstampAttribute);
     }
     _idAttribute = new Lazy <EntityAttribute>(() => FindIdAttribute(_attributes, idAttributeName));
     ExcludeUndeclaredAttributes   = excludeUndeclaredAttributes;
     ExcludeUndeclaredAssociations = excludeUndeclaredAssociations;
     ParentEntity = parentEntity;
     WhereClause  = whereClause;
     if (ParentEntity != null)
     {
     }
 }
예제 #2
0
 protected bool Equals(EntityAttribute other)
 {
     return(string.Equals(_name, other._name));
 }