Castle.ActiveRecord.ActiveRecordBase.ToString C# (CSharp) Method

ToString() public method

Return the type of the object with its PK value. Useful for logging/debugging
public ToString ( ) : String
return String
		public override String ToString()
		{
			ActiveRecordModel model = GetModel(GetType());

			if (model == null || model.PrimaryKey == null)
			{
				return base.ToString();
			}

			PrimaryKeyModel pkModel = model.PrimaryKey;

			object pkVal = pkModel.Property.GetValue(this, null);

			return base.ToString() + "#" + pkVal;
		}