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.
12 lines
354 B
C#
12 lines
354 B
C#
using DbFirst.BlazorWebApp.Models;
|
|
|
|
namespace DbFirst.BlazorWebApp.Services
|
|
{
|
|
public interface ILayoutApiClient
|
|
{
|
|
Task<LayoutDto?> GetAsync(string layoutType, string layoutKey, string userName);
|
|
Task<LayoutDto> UpsertAsync(LayoutDto dto);
|
|
Task DeleteAsync(string layoutType, string layoutKey, string userName);
|
|
}
|
|
}
|