• 1405/05/23

تمرین جلسه_کامل_ کردن_روابط_34 :

سلام وقت بخیر به آقای مدائنی 

این تمرین درسته 

    public class Role : BaseEnitiy
    {
        [MaxLength(100)]
        public string RoleName { get; set; }
        #region Relations
        public ICollection<UserInRoles> UserInRoles { get; set; }
        #endregion
    }
    public class UserInRoles
    {
        public int UserId { get; set; }
        public int RoleId { get; set; }

        #region Relation
        [ForeignKey("UserId")]
        public User User { get; set; }
        [ForeignKey("RoleId")]
        public Role Roles { get; set; }
        #endregion
    }
    
  • 1405/05/24
  • ساعت 08:22

به نظر درست میاد