Separating columnName and Value in C#
<p>I have a employee object as shown below</p>

<pre><code>class emp
    {
        public int EmpID { get; set; }
        public string EmpName { get; set; }
        public int deptID { get; set; }

    }
</code></pre>

<p>I need to create a mapping either in this class or a different class to map the properties with column name of my SQL</p>

<pre><code>for eg. EmpdID="employeeID"
        EmpName="EmployeeName"
        deptID="DepartmentID"
</code></pre>

<p>When from my asp.net page when I create the employee class and pass it to a function:</p>

<pre><code>for eg: emp e=new emp();
        e.EmpID=1;
        e.EmpName="tommy";    
        e.deptID=10;
</code></pre>

<p>When the emp object is populated and passed to the buildValues function it should return array of ComumnName(e.g.employeeID):Value(e.g.1),EmployeeName:tommy,DepartmentID:10)</p>

<pre><code>string[] values=buildValues(emp);


public string[] buildValues(emp e)
{
  string[] values=null;


  return values;
}
</code></pre>

<p>I have 2 questions:
1. Where do I specify the mappings
2. How do I use the mappings in my buildValues function shown above and build the values string array.</p>

<p>I would really appreciate if you can help me with this   </p>
