|
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="ChildEntity.cs" company="">
//
// </copyright>
// <summary>
// The child entity.
// </summary>
// --------------------------------------------------------------------------------------------------------------------
namespace DO4_Introduction.Model
{
using System;
using Xtensive.Storage;
/// <summary>
/// The child entity.
/// </summary>
[Serializable]
[HierarchyRoot]
public class ChildEntity : Entity
{
#region Constructors and Destructors
/// <summary>
/// Initializes a new instance of the <see cref="ChildEntity"/> class.
/// </summary>
/// <param name="parent">
/// The parent.
/// </param>
public ChildEntity(ParentEntity parent)
{
this.Parent = parent;
}
#endregion
#region Properties
/// <summary>
/// Gets Id.
/// </summary>
[Field]
[Key]
public long Id { get; private set; }
/// <summary>
/// Gets Parent.
/// </summary>
[Field]
[Association(PairTo = "Childs", OnTargetRemove = OnRemoveAction.Cascade)]
public ParentEntity Parent { get; private set; }
#endregion
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.