Example #1
0
        public async Task <AuthorsRequestClass> GetListOfAuthors()
        {
            var returnProp = new AuthorsRequestClass();

            try
            {
                var authorsList = await repoAuthors.GetAll();

                returnProp.AuthorsList = authorsList;
                return(returnProp);
            }
            catch (Exception ex)
            {
                returnProp.ErrorCode = -2;
                returnProp.ErrorText = "Internal Error Occurred Kindly Contact Administrator";
                StringBuilder sb = new StringBuilder();
                sb.AppendFormat("ErrorCode: {0} - ErrorText {1} - SysteError", returnProp.ErrorCode, ex.Message);
                sLogUtility.SaveLog(sb.ToString());
                return(returnProp);
            }
        }
Example #2
0
 public async Task <List <Models.Authors> > GetAllAuthors()
 {
     return(await _auRepo.GetAll());
 }
Example #3
0
 public async Task <List <FinalProject.Models.Authors> > GetAll()
 {
     return(await _authorRepo.GetAll());
 }
 // GET: api/Authors
 public IEnumerable <Author> Get()
 {
     logger.Write("GET for authors", LogLevel.INFO);
     return(authorsRepository.GetAll());
 }
Example #5
0
 public IEnumerable <Author> Get()
 {
     return(_rep.GetAll());
 }
 // GET: api/authors
 public IEnumerable <Author> Get()
 {
     return(_authorsRepository.GetAll());
 }
Example #7
0
        public IActionResult Get()
        {
            var authors = _authorsRepository.GetAll();

            return(Ok(authors));
        }