/// <summary> This method copy's each database field from the <paramref name="source"/> interface to this data row.</summary> public void Copy_From(IEntryToTag source, bool includePrimaryKey = false) { if (includePrimaryKey) this.Id = source.Id; this.FileName = source.FileName; this.Type = source.Type; this.Description = source.Description; this.TargetFileName = source.TargetFileName; }
/// <summary> /// This method copy's each database field which is in the <paramref name="includedColumns"/> /// from the <paramref name="source"/> interface to this data row. /// </summary> public void Copy_From_But_TakeOnly(IEntryToTag source, params string[] includedColumns) { if (includedColumns.Contains(EntriesToTagTable.IdCol)) this.Id = source.Id; if (includedColumns.Contains(EntriesToTagTable.FileNameCol)) this.FileName = source.FileName; if (includedColumns.Contains(EntriesToTagTable.TypeCol)) this.Type = source.Type; if (includedColumns.Contains(EntriesToTagTable.DescriptionCol)) this.Description = source.Description; if (includedColumns.Contains(EntriesToTagTable.TargetFileNameCol)) this.TargetFileName = source.TargetFileName; }
/// <summary> This method copy's each database field into the <paramref name="target"/> interface. </summary> public void Copy_To(IEntryToTag target, bool includePrimaryKey = false) { if (includePrimaryKey) target.Id = this.Id; target.FileName = this.FileName; target.Type = this.Type; target.Description = this.Description; target.TargetFileName = this.TargetFileName; }