public async Task <IActionResult> Delete(ToDoInputModel model)
        {
            ToDoViewModel todo = JsonConvert.DeserializeObject <ToDoViewModel>(model.JsonObj);

            try
            {
                await this.apiClient.DeleteApiObject(todo.Id);
            }
            catch (System.Exception)
            {
                return(BadRequest());
            }

            return(RedirectToAction("Index"));
        }
        public async Task <IActionResult> Index()
        {
            ToDoInputModel data = new ToDoInputModel();

            try
            {
                var all = await this.apiClient.GetApiObjects <ToDoViewModel>();

                data.Items = all;
            }
            catch (System.Exception)
            {
                return(BadRequest());
            }

            return(View(data));
        }