Datacontract class string members doesn't hold data if accessed in Datacontext class within the WCF service

Dec 10, 2008 at 1:37 PM
 Hi
   I have used Linq DataContext class within WCF service App, in which DataContract classes are used for DataContext's data type.

I have the following code:

 public class EmployeeDataContext : DataContext
    {
       
  public EmployeeDataContext ()
      { }

Public Employee GetEmployeeDetails(int empId)
{
return GetEmployee(empId);
}

Public int InsertEmployeeDetails(Employee employee)
{
 return CreateEmployee(employee.empId,employee.empName);
}  

Public int ImportEmployeeDetails(int empId,string empName)
{
      Employee employee=GetEmployeeDetails(defaultEmpId);
      employee.EmpId=empId;
      employee.Name=empName;

      InsertEmployeeDetails(employee);   //employee is the datacontract class object.
                                                            // employee.EmpId  int  datatpye has value in it, but   employee.Name string datatype is null/empty.
}

}

Please provide me solution on above mentioned problem.Thanks in advance.
Dec 10, 2008 at 6:29 PM
I would recommend taking this question to the LINQ to SQL forum.  This forum is for discussion about the CodePlex website only.