using System.Net.Http; using System.Net.Http.Json; using System.Threading.Tasks; using antblazorpro.Models; namespace antblazorpro.Services { public interface IProfileService { Task GetBasicAsync(); Task GetAdvancedAsync(); } public class ProfileService : IProfileService { private readonly HttpClient _httpClient; public ProfileService(HttpClient httpClient) { _httpClient = httpClient; } public async Task GetBasicAsync() { return await _httpClient.GetFromJsonAsync("data/basic.json"); } public async Task GetAdvancedAsync() { return await _httpClient.GetFromJsonAsync("data/advanced.json"); } } }