public ActionResult Edit(int id) { var result = _toDoListService.Get(id); if (result.HasError) { return(RedirectToAction("List")); } return(View(result.Data)); }
public IActionResult Get([FromQuery] ToDoListModel model = null) { if (model == null) { model = new ToDoListModel(); } var results = _logic.Get(model); return(this.Ok(results)); }
protected void rptToDoList_ItemCommand(object source, RepeaterCommandEventArgs e) { int id = Convert.ToInt32(e.CommandArgument); if (e.CommandName == "Delete") { var toDoList = _toDoListService.Get(id); _toDoListService.Delete(toDoList); } LoadToDoList(); }
public Task <IEnumerable <ToDoListVM> > Get() { return(_todolistService.Get()); //return new string[] { "value1", "value2" }; }
//[Route("GetId")] public async Task <IEnumerable <ToDoList> > Get(int id) { return(await _toDoListService.Get(id)); }