protected void SaveChildCollections(object parent) { TypeSchemaPropertyManager.ForEachChildCollection(parent, (type, coll) => { List <SqlStringBuilder> sqls = new List <SqlStringBuilder>(); foreach (object child in coll) { TypeSchemaPropertyManager.SetParentProperties(parent, child); if (child.Property <long>("Id") > 0) { sqls.AddRange(SqlWriter.GetUpdateStatements(child, Database)); } else { SetMeta(child); sqls.AddRange(SqlWriter.GetInsertStatements(child, Database)); } } sqls.ForEach(sql => ChildWriter(sql)); }); }
protected void SaveChildCollections(object parent) { TypeSchemaPropertyManager.SaveCollections(parent, ChildWriter); }
/// <summary> /// Sets the properties that represent PrimaryKeys if any /// </summary> /// <param name="parent"></param> /// <param name="child"></param> public void SetParentProperties(object parent, object child) { TypeSchemaPropertyManager.SetParentProperties(parent, child); }