Entity and N-Tier architecture in C#
Posted
by acadia
on Stack Overflow
See other posts from Stack Overflow
or by acadia
Published on 2010-05-19T17:17:47Z
Indexed on
2010/05/19
17:20 UTC
Read the original article
Hit count: 220
c#
|n-tier-architecture
Hello, 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 a entity class so that I can use n-tier architecture to do database transactions etc in C#. I started creating class for the same 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 as empDetails and empDocuments are related to emp by empID. How do I have those in my emp class.
I would appreciate if you can direct me to an example.
Thanks
© Stack Overflow or respective owner