Example #1
0
        public Employee Register(Employee employee)
        {
            int id = _cityLogic.SelectIdByName(employee.City);

            if (id == 0)
            {
                _cityLogic.Insert(new City {
                    Name = employee.City
                });
            }

            try
            {
                return(_employeeDao.Insert(employee));
            }
            catch
            {
                return(employee);
            }
        }