public EmployeeDetailModel Create(IApplicationModel employee)
        {
            EmployeeDetailModel employeeDetail = new EmployeeDetailModel();

            employeeDetail.FirstName = employee.FirstName;
            employeeDetail.LastName  = employee.LastName;
            employeeDetail.Email     = $"{employee.FirstName}.{employee.LastName}@csscorp.com";

            employeeDetail.IsManager = true;

            return(employeeDetail);
        }
Exemple #2
0
        public EmployeeDetailModel Create(IApplicationModel employee)
        {
            EmployeeDetailModel employeeDetail = new EmployeeDetailModel();

            employeeDetail.FirstName = employee.FirstName;
            employeeDetail.LastName  = employee.LastName;
            employeeDetail.Email     = $"{employee.FirstName}.{employee.LastName}@gmail.com";

            // without ocp
            //if (employee.EmployeeType == EmployeeType.Manager)
            //{
            //    employeeDetail.IsManager = true;
            //}
            return(employeeDetail);
        }