IEntityOfTPrimaryKey.cs 701 B

1234567891011121314151617181920
  1. namespace Abp.Domain.Entities
  2. {
  3. /// <summary>
  4. /// Defines interface for base entity type. All entities in the system must implement this interface.
  5. /// </summary>
  6. /// <typeparam name="TPrimaryKey">Type of the primary key of the entity</typeparam>
  7. public interface IEntity<TPrimaryKey>
  8. {
  9. /// <summary>
  10. /// Unique identifier for this entity.
  11. /// </summary>
  12. TPrimaryKey Id { get; set; }
  13. /// <summary>
  14. /// Checks if this entity is transient (not persisted to database and it has not an <see cref="Id"/>).
  15. /// </summary>
  16. /// <returns>True, if this entity is transient</returns>
  17. bool IsTransient();
  18. }
  19. }