protected override void OnInitialized() { Carpet = new CreateCarpetRequest(); }
public async Task AddNewCarpet(CreateCarpetRequest AddCarpet) { await CarpetService.AddNewCarpetAsync(AddCarpet); await ModalInstance.CloseAsync(); }
public async Task AddNewCarpetAsync(CreateCarpetRequest carpetRequest) { var CarpetRequestJson = new StringContent(JsonSerializer.Serialize(carpetRequest), Encoding.UTF8, "application/json"); await HttpClient.PostAsync($"carpet", CarpetRequestJson); }