diff --git a/Oqtane.Server/wwwroot/Modules/Templates/External/Client/Modules/[Owner].Module.[Module]/Edit.razor b/Oqtane.Server/wwwroot/Modules/Templates/External/Client/Modules/[Owner].Module.[Module]/Edit.razor index 886b0c07..a3d25ab5 100644 --- a/Oqtane.Server/wwwroot/Modules/Templates/External/Client/Modules/[Owner].Module.[Module]/Edit.razor +++ b/Oqtane.Server/wwwroot/Modules/Templates/External/Client/Modules/[Owner].Module.[Module]/Edit.razor @@ -4,7 +4,7 @@ @namespace [Owner].Module.[Module] @inherits ModuleBase -@inject I[Module]Service Client[Module]Service +@inject I[Module]Service [Module]Service @inject NavigationManager NavigationManager @inject IStringLocalizer Localizer @@ -55,7 +55,7 @@ if (PageState.Action == "Edit") { _id = Int32.Parse(PageState.QueryString["id"]); - [Module] [Module] = await Client[Module]Service.Get[Module]Async(_id, ModuleState.ModuleId); + [Module] [Module] = await [Module]Service.Get[Module]Async(_id, ModuleState.ModuleId); if ([Module] != null) { _name = [Module].Name; @@ -86,14 +86,14 @@ [Module] [Module] = new [Module](); [Module].ModuleId = ModuleState.ModuleId; [Module].Name = _name; - [Module] = await Client[Module]Service.Add[Module]Async([Module]); + [Module] = await [Module]Service.Add[Module]Async([Module]); await logger.LogInformation("[Module] Added {[Module]}", [Module]); } else { - [Module] [Module] = await Client[Module]Service.Get[Module]Async(_id, ModuleState.ModuleId); + [Module] [Module] = await [Module]Service.Get[Module]Async(_id, ModuleState.ModuleId); [Module].Name = _name; - await Client[Module]Service.Update[Module]Async([Module]); + await [Module]Service.Update[Module]Async([Module]); await logger.LogInformation("[Module] Updated {[Module]}", [Module]); } NavigationManager.NavigateTo(NavigateUrl()); diff --git a/Oqtane.Server/wwwroot/Modules/Templates/External/Client/Modules/[Owner].Module.[Module]/Index.razor b/Oqtane.Server/wwwroot/Modules/Templates/External/Client/Modules/[Owner].Module.[Module]/Index.razor index e5d5d4e3..6f43dcb3 100644 --- a/Oqtane.Server/wwwroot/Modules/Templates/External/Client/Modules/[Owner].Module.[Module]/Index.razor +++ b/Oqtane.Server/wwwroot/Modules/Templates/External/Client/Modules/[Owner].Module.[Module]/Index.razor @@ -3,7 +3,7 @@ @namespace [Owner].Module.[Module] @inherits ModuleBase -@inject I[Module]Service Client[Module]Service +@inject I[Module]Service [Module]Service @inject NavigationManager NavigationManager @inject IStringLocalizer Localizer @@ -52,7 +52,7 @@ else { try { - _[Module]s = await Client[Module]Service.Get[Module]sAsync(ModuleState.ModuleId); + _[Module]s = await [Module]Service.Get[Module]sAsync(ModuleState.ModuleId); } catch (Exception ex) { @@ -65,9 +65,9 @@ else { try { - await Client[Module]Service.Delete[Module]Async([Module].[Module]Id, ModuleState.ModuleId); + await [Module]Service.Delete[Module]Async([Module].[Module]Id, ModuleState.ModuleId); await logger.LogInformation("[Module] Deleted {[Module]}", [Module]); - _[Module]s = await Client[Module]Service.Get[Module]sAsync(ModuleState.ModuleId); + _[Module]s = await [Module]Service.Get[Module]sAsync(ModuleState.ModuleId); StateHasChanged(); } catch (Exception ex) diff --git a/Oqtane.Server/wwwroot/Modules/Templates/External/Client/Services/Client[Module]Service.cs b/Oqtane.Server/wwwroot/Modules/Templates/External/Client/Services/[Module]Service.cs similarity index 90% rename from Oqtane.Server/wwwroot/Modules/Templates/External/Client/Services/Client[Module]Service.cs rename to Oqtane.Server/wwwroot/Modules/Templates/External/Client/Services/[Module]Service.cs index ec451c42..24046476 100644 --- a/Oqtane.Server/wwwroot/Modules/Templates/External/Client/Services/Client[Module]Service.cs +++ b/Oqtane.Server/wwwroot/Modules/Templates/External/Client/Services/[Module]Service.cs @@ -8,9 +8,9 @@ using Oqtane.Shared; namespace [Owner].Module.[Module].Services { - public class Client[Module]Service : ServiceBase, I[Module]Service + public class [Module]Service : ServiceBase, I[Module]Service { - public Client[Module]Service(HttpClient http, SiteState siteState) : base(http, siteState) { } + public [Module]Service(HttpClient http, SiteState siteState) : base(http, siteState) { } private string Apiurl => CreateApiUrl("[Module]"); diff --git a/Oqtane.Server/wwwroot/Modules/Templates/External/Client/Startup/ClientStartup.cs b/Oqtane.Server/wwwroot/Modules/Templates/External/Client/Startup/ClientStartup.cs index 14170a14..95ed096c 100644 --- a/Oqtane.Server/wwwroot/Modules/Templates/External/Client/Startup/ClientStartup.cs +++ b/Oqtane.Server/wwwroot/Modules/Templates/External/Client/Startup/ClientStartup.cs @@ -11,7 +11,7 @@ namespace [Owner].Module.[Module].Startup { if (!services.Any(s => s.ServiceType == typeof(I[Module]Service))) { - services.AddScoped(); + services.AddScoped(); } } } diff --git a/Oqtane.Server/wwwroot/Modules/Templates/External/Client/[Owner].Module.[Module].Client.csproj b/Oqtane.Server/wwwroot/Modules/Templates/External/Client/[Owner].Module.[Module].Client.csproj index fce77d74..deaadec5 100644 --- a/Oqtane.Server/wwwroot/Modules/Templates/External/Client/[Owner].Module.[Module].Client.csproj +++ b/Oqtane.Server/wwwroot/Modules/Templates/External/Client/[Owner].Module.[Module].Client.csproj @@ -17,6 +17,7 @@ + diff --git a/Oqtane.Server/wwwroot/Modules/Templates/External/Server/Services/Server[Module]Service.cs b/Oqtane.Server/wwwroot/Modules/Templates/External/Server/Services/[Module]Service.cs similarity index 100% rename from Oqtane.Server/wwwroot/Modules/Templates/External/Server/Services/Server[Module]Service.cs rename to Oqtane.Server/wwwroot/Modules/Templates/External/Server/Services/[Module]Service.cs