public async Task <UserCourseExamModel> Add(UserCourseExamModel model)
        {
            try
            {
                var entity = _mapper.Map <UserCourseExam>(model);
                await _repository.Insert(entity);

                return(model);
            }
            catch (Exception)
            {
                throw;
            }
        }
        public async Task <UserCourseExamModel> Update(UserCourseExamModel model)
        {
            try
            {
                var entity = await _repository.Find(model.Id);

                if (entity == null)
                {
                    throw new Exception("UserCourseExam not found");
                }

                _mapper.Map(model, entity);
                await _repository.Update(entity);

                return(model);
            }
            catch (Exception)
            {
                throw;
            }
        }