Пример #1
0
		///	<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(ITagsToEntry source, params string[] includedColumns)
		{
			if (includedColumns.Contains(TagsToEntriesTable.IdCol)) this.Id = source.Id;
			if (includedColumns.Contains(TagsToEntriesTable.TagIdCol)) this.TagId = source.TagId;
			if (includedColumns.Contains(TagsToEntriesTable.EntriesIdCol)) this.EntriesId = source.EntriesId;
		}
Пример #2
0
		///	<summary> This method copy's each database field from the <paramref name="source"/> interface to this data row.</summary>
		public void Copy_From(ITagsToEntry source, bool includePrimaryKey = false)
		{
			if (includePrimaryKey) this.Id = source.Id;
			this.TagId = source.TagId;
			this.EntriesId = source.EntriesId;
		}
Пример #3
0
		///	<summary> 
		///		This method copy's each database field which is not in the <paramref name="excludedColumns"/> 
		///		from the <paramref name="source"/> interface to this data row.
		/// </summary>
		public void Copy_From_But_Ignore(ITagsToEntry source, params string[] excludedColumns)
		{
			if (!excludedColumns.Contains(TagsToEntriesTable.IdCol)) this.Id = source.Id;
			if (!excludedColumns.Contains(TagsToEntriesTable.TagIdCol)) this.TagId = source.TagId;
			if (!excludedColumns.Contains(TagsToEntriesTable.EntriesIdCol)) this.EntriesId = source.EntriesId;
		}
Пример #4
0
		///	<summary> This method copy's each database field into the <paramref name="target"/> interface. </summary>
		public void Copy_To(ITagsToEntry target, bool includePrimaryKey = false)
		{
			if (includePrimaryKey) target.Id = this.Id;
			target.TagId = this.TagId;
			target.EntriesId = this.EntriesId;
		}