예제 #1
0
        public void Create(EmployeeModel employee)
        {
            var auxCountry = new Country
            {
                ID = employee.Country.ID
            };


            var auxShift = new Shift
            {
                ID = employee.CurrentShift.ID
            };

            var newEmployee = new Employee()
            {
                FirstName = employee.FirstName,

                LastName = employee.LastName,

                Country = auxCountry,

                EntryDate = employee.EntryDate,

                CurrentShift = auxShift,

                ValueByHour = employee.ValueByHour
            };

            repoEmployees.Create(newEmployee);
        }