public bool AddToDo(string title, string content, int status, int categoryId, int createBy) { try { if (_categoryRepository.IsCategoryAvailable(categoryId)) { _toDoRepository.Insert(ToDo.Create(title, content, status, categoryId, createBy)); _toDoRepository.Commit(); return(true); } return(false); } catch (Exception ex) { return(false); } }