Esempio n. 1
0
        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);
        }
Esempio n. 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);
        }