public async Task <IActionResult> Get(int rn, int c)
        {
            if (rn < 0 || c <= 0)
            {
                return(BadRequest("Request number or count is less than zero."));
            }

            string email = Helper.GetEmail(HttpContext);
            var    todos = await _repo.GetTodos(rn, c, email);

            if (todos == null)
            {
                return(NotFound());
            }

            return(Ok(todos));
        }
        public ActionResult <IEnumerable <Todo> > GetTodos()
        {
            IEnumerable <Todo> Todos = _repository.GetTodos();

            return(Ok(Todos));
        }
Exemple #3
0
        public ActionResult <IEnumerable <Todo> > GetAllTodos()
        {
            var todosItems = _repository.GetTodos();

            return(Ok(todosItems));
        }