public async Task <IViewComponentResult> InvokeAsync(string view = "MyMovement") { switch (view) { case "MyMovement": { var model = cmService.Select_ToDo(); return(await Task.FromResult <IViewComponentResult>(View(view, model))); } case "MovementCount": { var model = cmService.Select_ToDoCount(); return(await Task.FromResult <IViewComponentResult>(View(view, model))); } default: return(null); } }
public IActionResult MyMovment_LoadData(IDataTablesRequest request) { var data = service.Select_ToDo(); return(request.GetResponse(data.AsQueryable())); }