Beispiel #1
0
        public async Task <Instructor> CreateInstructorAsync(InstructorViewModel model)
        {
            try
            {
                var instructor = mapper.Map <Instructor>(model);

                var created = await repository.CreateInstructorAsync(instructor);

                return(await SaveAndReturn(created));
            }
            catch (Exception e)
            {
                throw e;
            }
        }