I must implement a function for my Website, that creates a Json file from a list of bookings and download it, when i use the export-button on the site. And i have NO idea how that works ^^ The Website Looks like this:
Until now I have only the following Code:
[HttpGet]
public IActionResult Export()
{
var bookings = _cache.GetOrCreate(BookingsCacheKey, BookingListFactory);
string output = JsonConvert.SerializeObject(bookings);
return View("Index");
}
The bookings are saved in a IList called bookings. And the list is saved in the cache.
Thx for help :)