public async Task Create(BusinessCustomerCommandDto.AddCustomer CustomerDto) { var Response = await Client.PostAsJsonAsync ( $"BusinessCustomer?CompanyId={CustomerDto.CompanyId}&FirstName={CustomerDto.FirstName}&LastName={CustomerDto.LastName}" + $"&CVR={CustomerDto.CVR}&EAN={CustomerDto.EAN}&WWW={CustomerDto.WWW}&VatCode={CustomerDto.VatCode}" + $"&DebitorNo={CustomerDto.DebitorNo}&Username={CustomerDto.Username}&Password={CustomerDto.Password}" + $"&Text={CustomerDto.Text}&AccountNo={CustomerDto.AccountNo}", CustomerDto ); if (Response.IsSuccessStatusCode) { await Js.InvokeVoidAsync("alert", $"Kunden er nu oprettet!"); } else { await Js.InvokeVoidAsync("alert", $"Noget gik galt! Prøv igen."); } }
public Task <IActionResult> PostCustomer(BusinessCustomerCommandDto.AddCustomer request) => RequestHandler.HandleCommand(request, Application.Handle, Log);