From 0dc9382215212c19540594b0b0d795bb57ba8522 Mon Sep 17 00:00:00 2001 From: Leigh Pointer Date: Fri, 30 Jan 2026 17:59:29 +0100 Subject: [PATCH] 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. --- .../Client/Services/[Module]Service.cs | 12 ------------ .../Shared/Interfaces/I[Module]Service.cs | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+), 12 deletions(-) create mode 100644 Oqtane.Application/Server/wwwroot/Modules/Templates/Internal/Shared/Interfaces/I[Module]Service.cs diff --git a/Oqtane.Application/Server/wwwroot/Modules/Templates/Internal/Client/Services/[Module]Service.cs b/Oqtane.Application/Server/wwwroot/Modules/Templates/Internal/Client/Services/[Module]Service.cs index d433d698..24046476 100644 --- a/Oqtane.Application/Server/wwwroot/Modules/Templates/Internal/Client/Services/[Module]Service.cs +++ b/Oqtane.Application/Server/wwwroot/Modules/Templates/Internal/Client/Services/[Module]Service.cs @@ -7,18 +7,6 @@ using Oqtane.Shared; namespace [Owner].Module.[Module].Services { - public interface I[Module]Service - { - Task> Get[Module]sAsync(int ModuleId); - - Task Get[Module]Async(int [Module]Id, int ModuleId); - - Task Add[Module]Async(Models.[Module] [Module]); - - Task Update[Module]Async(Models.[Module] [Module]); - - Task Delete[Module]Async(int [Module]Id, int ModuleId); - } public class [Module]Service : ServiceBase, I[Module]Service { diff --git a/Oqtane.Application/Server/wwwroot/Modules/Templates/Internal/Shared/Interfaces/I[Module]Service.cs b/Oqtane.Application/Server/wwwroot/Modules/Templates/Internal/Shared/Interfaces/I[Module]Service.cs new file mode 100644 index 00000000..8c75bf44 --- /dev/null +++ b/Oqtane.Application/Server/wwwroot/Modules/Templates/Internal/Shared/Interfaces/I[Module]Service.cs @@ -0,0 +1,18 @@ +using System.Collections.Generic; +using System.Threading.Tasks; + +namespace [Owner].Module.[Module].Services +{ + public interface I[Module]Service + { + Task> Get[Module]sAsync(int ModuleId); + + Task Get[Module]Async(int [Module]Id, int ModuleId); + + Task Add[Module]Async(Models.[Module] [Module]); + + Task Update[Module]Async(Models.[Module] [Module]); + + Task Delete[Module]Async(int [Module]Id, int ModuleId); + } +}