Exemple #1
0
        /// <summary>
        /// Adds a field information.
        /// </summary>
        /// <param name="name">The name.</param>
        /// <param name="isPrimaryKey">if set to <c>true</c> [is primary key].</param>
        /// <param name="avoidUpdate">if set to <c>true</c> [avoid update].</param>
        /// <returns></returns>
        public IMetamodelField AddField(string name, bool isPrimaryKey, bool avoidUpdate)
        {
            IMetamodelField field = this.GetField(name);

            if (field == null)
            {
                field = new MetamodelField(name, isPrimaryKey, avoidUpdate);
                this.Fields.Add(field);
            }
            else
            {
                field.IsPrimaryKey = isPrimaryKey;
                field.AvoidUpdate  = avoidUpdate;
            }
            return(field);
        }
Exemple #2
0
 /// <summary>
 /// Adds a field information.
 /// </summary>
 /// <param name="name">The name.</param>
 /// <param name="isPrimaryKey">if set to <c>true</c> [is primary key].</param>
 /// <param name="avoidUpdate">if set to <c>true</c> [avoid update].</param>
 /// <returns></returns>
 public IMetamodelField AddField(string name, bool isPrimaryKey, bool avoidUpdate)
 {
     IMetamodelField field = this.GetField(name);
     if (field == null)
     {
         field = new MetamodelField(name, isPrimaryKey, avoidUpdate);
         this.Fields.Add(field);
     }
     else
     {
         field.IsPrimaryKey = isPrimaryKey;
         field.AvoidUpdate = avoidUpdate;
     }
     return field;
 }