using SytelineSaAppEfDataModel.Dtos; namespace OrdersManagement.Services; public class EdiCustomerOrderTranslateService( IHttpClientFactory httpClientFactory, CustomAuthenticationStateProvider authenticationStateProvider) : ServiceBase(httpClientFactory, authenticationStateProvider) { public async Task?> GetEdiCustomerOrdersTranslationsAsync() { try { return await GetListAsync("api/EdiCustomerOrdersTranslations"); } catch (HttpRequestException ex) { Console.WriteLine($"Błąd HTTP w GetEdiCustomerOrdersTranslationsAsync: {ex.Message}"); return null; } } public async Task DeleteEdiCustomerOrderTranslateAsync(EdiCustomerOrderTranslateDto ediCustomerOrderTranslateDto) { HttpResponseMessage responseMessage = await DeleteAsync($"api/EdiCustomerOrdersTranslations/?id={ediCustomerOrderTranslateDto.Id}"); return responseMessage.IsSuccessStatusCode ? 1 : 0; } }