I have a table structure as follows
FeedbackTable
Id
Name
...
...
ApprovalTable
Id
FeedbackId
...
...
FeedbackTable and ApprovalTable is having 1-1 relation.When i generated Model (using Database First Approach) Feedback model
is having icollection
of Approval Table
.I need to change to 1-1 relation with navigation in the actual model class.
How can I do it? Is it possible to set 1-1 relation from the database itself before creating model?
StudentFeedback Model
public partial class StudentFeedback
{
public StudentFeedback()
{
this.StudentProjectApprovals = new HashSet<StudentProjectApproval>();
}
...
...
...
public virtual Icollection<StudentProjectApproval> StudentProjectApprovals { get; set; }
}