public long GetPercentageDone(int listId) { var projectsFinished = _todoManager.GetAllTodos(listId, StatusTypes.Status.Success).Count(); var allProjects = _todoManager.GetTodos(listId).Count(); if (allProjects <= 0) { return(0); } return((projectsFinished * 100) / allProjects); }
public ActionResult <IEnumerable <TodoItem> > Get() { return(todoManager.GetAllTodos()); }