Entity.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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; }
  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. public abstract class EntityKeyless : IDao
  21. {
  22. #region *** Properties ***
  23. #endregion
  24. protected EntityKeyless()
  25. {
  26. }
  27. #region *** Public Overrides ***
  28. public override string ToString()
  29. {
  30. var sb = new StringBuilder();
  31. sb.Append("Entity=").Append(GetType().Name);
  32. return sb.ToString();
  33. }
  34. #endregion
  35. }
  36. }