suppose i have table student
public class Student
{
public int Id { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public string Class { get; set; }
public string ParentName { get; set; }
public string Address { get; set; }
public int CourseId { get; set; }
public virtual Course Course { get; set; }
}
and another table Course
public class Course
{
public int Id { get; set; }
public string Name { get; set; }
}
from above two model class we can there is a relationship course with courseId any foreign key for those table is it possible by using mvc entity framework i used uniformity for this i got "Invalid column name 'Course_Id'" error by using this is there any possible to give relationship to those table can any one help me.