CoinCategoryMap.cs 523 B

123456789101112131415161718192021
  1. using System.ComponentModel.DataAnnotations;
  2. using System.ComponentModel.DataAnnotations.Schema;
  3. namespace Domain.Entities.Crypto
  4. {
  5. public class CoinCategoryMap
  6. {
  7. [ForeignKey(nameof(CoinID))]
  8. public virtual Coin Coin { get; set; } = null!;
  9. [ForeignKey(nameof(CategoryID))]
  10. public virtual CoinCategory CoinCategory { get; set; } = null!;
  11. [Key]
  12. public int ID { get; set; }
  13. public int CoinID { get; set; }
  14. public int CategoryID { get; set; }
  15. }
  16. }