using Microsoft.AspNetCore.Hosting; public async Task<NESTO?> GetKiaDealerInfoAsync() { string location = _webHostEnvironment.WebRootPath; string fileName = "PUTANJA"; string filePath = Path.Combine(location, fileName); using (StreamReader streamReader = new(filePath)) { string json = await streamReader.ReadToEndAsync(); return JsonSerializer.Deserialize<NESTO>(json); } }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter