using System.ComponentModel.DataAnnotations.Schema; namespace Back.Data.Models { public class QuestionCategory { public int ID { get; set; } public string Title { get; set; } #region Navigation public virtual ICollection questions { get; set; } #endregion } public class Question { public int ID { get; set; } public int QuestionCategoryID { get; set; } public string Title { get; set; } public string Answer { get; set; } public bool Status { get; set; } #region Navigation [ForeignKey("QuestionCategoryID")] public virtual QuestionCategory questionCategory { get; set; } #endregion } }