Exemplo n.º 1
0
        public static Employee TranslateToEmployee(EmployeeModel employeeModel)
        {
            Employee employeeDataContractObject=new Employee();
               employeeDataContractObject.Id = employeeModel.Id;
               employeeDataContractObject.Title = employeeModel.Title;
               employeeDataContractObject.FirstName = employeeModel.FirstName;
               employeeDataContractObject.LastName = employeeModel.LastName;
               employeeDataContractObject.Email = employeeModel.Email;
               employeeDataContractObject.EmployeeRemark = employeeModel.Remark;

               return employeeDataContractObject;
        }
Exemplo n.º 2
0
        public static void InsertEmployeeIntoFile(EmployeeModel employee)
        {
            var jsonString = JsonConvert.SerializeObject(employee);

            FileSystem file = new FileSystem();
            file.SaveEmployee(jsonString, employee.Id);
        }
 public static IEmployeeHandler CreateInstance(string title,string firstName,string lastName,string email)
 {
     var employeeHandler=new EmployeeModel(title,firstName,lastName,email);
     return employeeHandler;
 }