Me and my clients want to move to .NET so I still didn't get it to return more than 1 vars/strings in .NET. How to return something like this in .NET?
//Verdienst für Heute ausrechnen
$clicksToCoinsToday = Click::whereIn('short_link_id', $short_link_id)->whereDate('created_at', $today)->sum('click_amount');
//Verdienst für letzte 7 Tage ausrechnen
$clicksToCoinsLast7Days = Click::whereIn('short_link_id', $short_link_id)->whereDate('created_at', '>=', $lastweek)->sum('click_amount');
return view('dashboard.admin.nutzerProfil', compact('nutzerDaten', 'clicksToCoinsYesterday', 'clicksToCoinsToday', 'clicksToCoinsLast7Days', 'allCoins'));
In C#
public ActionResult GetClicks(List<Click> clicks, string clicksCount)
{
clicks = _context.Clicks.ToList();
clicksCount = _context.Clicks.Count().ToString();
return (clicks, clicksCount);
}
I wanted to get Clicks to List and also count how many of them are in DB.