I have three tables as shown below
Emp
----
empID int
empName
deptID
empDetails
-----------
empDetailsID int
empID int
empDocuments
--------------
docID
empID
docName
docType
I am creating an entity class so that I can use the n-tier architecture for database transactions, etc. in C #. I started creating the class as shown below.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace employee
{
class emp
{
private int empID;
private string empName;
private int deptID;
public int EmpID { get; set; }
public string EmpName { get; set; }
public int deptID { get; set; }
}
}
My question is that empDetails and empDocuments are associated with emp using empID. How to do this in the emp class.
I would be grateful if you can guide me for example.
thank
source
share