Created
September 6, 2022 13:31
-
-
Save jskeet/0a07a54f303cc7f796d4a3443ead95de to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.Text.Json; | |
| namespace ContosoCrafts.Website.Services; | |
| public class JsonFileProductService | |
| { | |
| public IWebHostEnvironment WebHostEnvironment { get; } | |
| private string JsonFileName => | |
| Path.Combine(WebHostEnvironment.WebRootPath, "data", "products.json"); | |
| public JsonFileProductService(IWebHostEnvironment webHostEnvironment) => | |
| WebHostEnvironment = webHostEnvironment; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment