/// <summary> /// Adds given record to update-queue, to be updated in SaveChanges operation. Also checks for inner properties' relationships. /// </summary> /// <param name="record">Record to be analyzed and updated.</param> public void Update(T record) { if (CustomAttr.Validator(record)) //Checks the attributes { CheckInside(record, "Update"); ProcessMTM(record); this.Updates.Add(record); } }
/// <summary> /// Adds given record to add-queue, to be added in SaveChanges operation. Also checks for inner properties' relationships. /// </summary> /// <param name="record">Record to add.</param> public void Add(T record) { if (CustomAttr.Validator(record)) //Checks the attributes { CheckInside(record, "Add"); //içteki OTO ve OTM ilişkileri işler. ProcessMTM(record); //içteki MTM ilişkileri işler. } if (allRecords.Contains(record)) { return; } recordsToAddDirectly.Add(record); }
/// <summary> /// Adds the record to addaschild-queue to be added in SaveChanges operation. Record will be given an id, and the parent will be updated with the id as foreign key in data tables. /// </summary> /// <param name="owner">Owner of the record.</param> /// <param name="record">Record.</param> public void AddAsChild(BaseClass owner, BaseClass record) { //add'in içindeki işlemler. bunun da içinde çocuk nesne olabilir. if (CustomAttr.Validator(record)) //Checks the attributes { CheckInside((T)record, "AddAsChild"); ProcessMTM((T)record); } if (allRecords.Contains((T)record)) { return; } recordsToAddAsOTO.Add(new Tuple <object, object>(owner, record)); }