Introduce interfaces for all API clients and update dependency injection to use these interfaces. Refactor services and components to depend on abstractions instead of concrete implementations, improving testability and maintainability.
13 lines
394 B
C#
13 lines
394 B
C#
using DbFirst.BlazorWebApp.Models;
|
|
|
|
namespace DbFirst.BlazorWebApp.Services
|
|
{
|
|
public interface IMassDataApiClient
|
|
{
|
|
Task<int> GetCountAsync();
|
|
Task<List<MassDataReadDto>> GetAllAsync(int? skip, int? take);
|
|
Task<ApiResult<MassDataReadDto?>> UpsertAsync(MassDataWriteDto dto);
|
|
Task<MassDataReadDto?> GetByCustomerNameAsync(string customerName);
|
|
}
|
|
}
|