Entity.cs 642 B

12345678910111213141516171819202122232425262728
  1. using System;
  2. using System.Text;
  3. using Quadarax.Foundation.Core.Data.Interface.Entity;
  4. namespace Quadarax.Foundation.Core.Data.Entity
  5. {
  6. public abstract class Entity<TKey> : IDao<TKey> where TKey : IEquatable<TKey>
  7. {
  8. #region *** Properties ***
  9. public virtual TKey Id { get; set; } = default!;
  10. #endregion
  11. #region *** Public Overrides ***
  12. public override string ToString()
  13. {
  14. var sb = new StringBuilder();
  15. sb.Append("Entity=").Append(GetType().Name).Append(";Id=").Append(Id);
  16. return sb.ToString();
  17. }
  18. #endregion
  19. }
  20. }