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); } }
public async Task <List <Models.Authors> > GetAllAuthors() { return(await _auRepo.GetAll()); }
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()); }
public IEnumerable <Author> Get() { return(_rep.GetAll()); }
// GET: api/authors public IEnumerable <Author> Get() { return(_authorsRepository.GetAll()); }
public IActionResult Get() { var authors = _authorsRepository.GetAll(); return(Ok(authors)); }