Skip to content

Instantly share code, notes, and snippets.

@guntidheerajkumar
Created July 13, 2017 08:06
Show Gist options
  • Select an option

  • Save guntidheerajkumar/9b1d46f3c9ecfd10dea8c86885ddcba6 to your computer and use it in GitHub Desktop.

Select an option

Save guntidheerajkumar/9b1d46f3c9ecfd10dea8c86885ddcba6 to your computer and use it in GitHub Desktop.
public class Employee
{
public Employee()
{
}
///Primary Key
public int EmpId
{
get;
set;
}
public string EmpName
{
get;
set;
}
///Specify the same name as in the department
public int DeptId
{
get;
set;
}
public virtual Department Department { get; set; }
}
public class Department
{
///Primary Key
public int DeptId
{
get;
set;
}
public string DepartmentName
{
get;
set;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment