using MongoDB.Bson.Serialization.Attributes;
namespace Common.Base
{
///
/// Component的Id与Owner Entity Id一样
///
public abstract class Component: Object where T: Entity
{
private T owner;
[BsonIgnore]
public T Owner
{
get
{
return owner;
}
set
{
this.owner = value;
this.Id = this.owner.Id;
}
}
}
}