using System; namespace Abp.Domain.Entities { /// /// Used to identify an entity. /// Can be used to store an entity and . /// [Serializable] public class EntityIdentifier { /// /// Entity Type. /// public Type Type { get; private set; } /// /// Entity's Id. /// public object Id { get; private set; } /// /// Added for serialization purposes. /// private EntityIdentifier() { } /// /// Initializes a new instance of the class. /// /// Entity type. /// Id of the entity. public EntityIdentifier(Type type, object id) { if (type == null) { throw new ArgumentNullException("type"); } if (id == null) { throw new ArgumentNullException("id"); } Type = type; Id = id; } } }