Пример #1
0
        public async Task <HttpStatusCode> AddEmployeeTasks(EmployeeTaskCollection data)
        {
            //Step through collection and add employeetasks accordingly
            try
            {
                foreach (var empTask in data.EmployeeTasks)
                {
                    await _employeetaskRepository.InsertEmployeeTask(_mapper.Map <EmployeeTask>(empTask));
                }
            }
            catch (Exception Ex)
            { throw; }

            //var result = await _employeetaskRepository.InsertEmployeeTask(_mapper.Map<EmployeeTask>(data), cancellationToken);
            return(HttpStatusCode.OK);// _mapper.Map<TaskDto>(result);
        }