/// <summary> This method copy's each database field from the <paramref name="source"/> interface to this data row.</summary> public void Copy_From(IWahl source, bool includePrimaryKey = false) { if (includePrimaryKey) this.Id = source.Id; this.KurzName = source.KurzName; this.Name = source.Name; this.StartDate = source.StartDate; this.LastUpdateToken = source.LastUpdateToken; }
/// <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(IWahl source, params string[] includedColumns) { if (includedColumns.Contains(WahlenTable.IdCol)) this.Id = source.Id; if (includedColumns.Contains(WahlenTable.KurzNameCol)) this.KurzName = source.KurzName; if (includedColumns.Contains(WahlenTable.NameCol)) this.Name = source.Name; if (includedColumns.Contains(WahlenTable.StartDateCol)) this.StartDate = source.StartDate; if (includedColumns.Contains(WahlenTable.LastUpdateTokenCol)) this.LastUpdateToken = source.LastUpdateToken; }
/// <summary> This method copy's each database field into the <paramref name="target"/> interface. </summary> public void Copy_To(IWahl target, bool includePrimaryKey = false) { if (includePrimaryKey) target.Id = this.Id; target.KurzName = this.KurzName; target.Name = this.Name; target.StartDate = this.StartDate; target.LastUpdateToken = this.LastUpdateToken; }