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

            return(Ok(authors));
        }