Exemplo n.º 1
0
        public async Task <ResponseBase <IEnumerable <EmployeeCourse> > > GetEmployeeCourses()
        {
            try
            {
                GetUserId();
                var employeeCourses = await _courseAppService.GetEmployeeCourses(UserId);

                return(new ResponseBase <IEnumerable <EmployeeCourse> >()
                {
                    IsSuccess = true, ErrorDetails = null, Payload = employeeCourses
                });
            }
            catch (Exception ex)
            {
                LogError(ex);
                return(new ResponseBase <IEnumerable <EmployeeCourse> >()
                {
                    ErrorDetails = Error(), IsSuccess = false, Payload = null
                });
            }
        }