Move I[Module]Service to Shared/Interfaces

Extract the I[Module]Service interface out of Client/Services/[Module]Service.cs and add it as a new shared interface file at Internal/Shared/Interfaces/I[Module]Service.cs. The inline interface definition was removed from [Module]Service.cs so the service class now implements the shared contract, centralizing the interface for reuse across components.
This commit is contained in:
Leigh Pointer
2026-01-30 17:59:29 +01:00
parent 6d4870f41a
commit 0dc9382215
2 changed files with 18 additions and 12 deletions

View File

@@ -7,18 +7,6 @@ using Oqtane.Shared;
namespace [Owner].Module.[Module].Services
{
public interface I[Module]Service
{
Task<List<Models.[Module]>> Get[Module]sAsync(int ModuleId);
Task<Models.[Module]> Get[Module]Async(int [Module]Id, int ModuleId);
Task<Models.[Module]> Add[Module]Async(Models.[Module] [Module]);
Task<Models.[Module]> Update[Module]Async(Models.[Module] [Module]);
Task Delete[Module]Async(int [Module]Id, int ModuleId);
}
public class [Module]Service : ServiceBase, I[Module]Service
{

View File

@@ -0,0 +1,18 @@
using System.Collections.Generic;
using System.Threading.Tasks;
namespace [Owner].Module.[Module].Services
{
public interface I[Module]Service
{
Task<List<Models.[Module]>> Get[Module]sAsync(int ModuleId);
Task<Models.[Module]> Get[Module]Async(int [Module]Id, int ModuleId);
Task<Models.[Module]> Add[Module]Async(Models.[Module] [Module]);
Task<Models.[Module]> Update[Module]Async(Models.[Module] [Module]);
Task Delete[Module]Async(int [Module]Id, int ModuleId);
}
}