Ejemplo n.º 1
0
        public async Task <IActionResult> GetList(string name, int status, long newSourceId, int pageSize = 10, int pageNumber = 0)
        {
            try
            {
                var data = await _authorManager.Get_List(name, status, newSourceId, pageSize, pageNumber);

                if (data == null)
                {
                    throw new Exception(MessageConst.DATA_NOT_FOUND);
                }
                return(Ok(data));
            }
            catch (Exception ex)
            {
                return(StatusCode(500, ex.Message));
            }
        }