public static void Add(EmployeeDTO e) { DataClasses1DataContext context = new DataClasses1DataContext(); Employee emp = Converter.EmployeeDTOtoEmp(e); context.Employees.InsertOnSubmit(emp); context.SubmitChanges(); }
public static List<EmployeeDTO> GetEmployee() { DataClasses1DataContext context = new DataClasses1DataContext(); var result = from r in context.Employees select r; List<EmployeeDTO> lstEmpDto = Converter.LstEmpToLstEmpDTO( result.ToList()); return lstEmpDto; }