public IActionResult Index() { Dictionary <string, object> sortable = new Dictionary <string, object>(); sortable.Add("sortColumn", "date"); sortable.Add("sortType", "DESC"); sortable.Add("offset", 0); sortable.Add("max", 10); var finances = _financesRepo.GetAllFinancesByUserId(userId, sortable, null); TempData["sum"] = _financesRepo.GetFinancesSumByUserId(userId, null); return(View(finances)); }
public IActionResult Index() { if (userId == 0) { return(View()); } Dictionary <string, object> sortable = new Dictionary <string, object>(); sortable.Add("sortColumn", "id_finance"); sortable.Add("sortType", "DESC"); sortable.Add("offset", 0); sortable.Add("max", 7); return(View(_financesRepo.GetAllFinancesByUserId(userId, sortable, null))); }