// GET: MatchSeries public async Task <IActionResult> Index(int?page, int?userId) { ViewBag.Name = "Series"; var users = await _userManager.GetUserAsync(HttpContext.User); if (users != null) { userId = users.Id; } var model = await _series.GetAllSeries(page, userId); return(View(model)); }
public async Task <IActionResult> Index(DataTableAjaxPostModel model, int?page, bool isApi) { ViewBag.Name = "Series"; var result = await _series.GetAllSeries(model.Init(), page); if (isApi == true) { return(Json(new { data = result, draw = model.Draw, recordsTotal = result.TotalCount, recordsFiltered = result.TotalCount, })); } else { return(View(result)); } }