[ENHANCE] - Added Module to NameSpace [Owner].Module.[Module]

[ENHANCE] - Added Module to NameSpace [Owner].Module.[Module]
This commit is contained in:
vnetonline
2023-06-20 16:52:50 +10:00
parent fcb05a7834
commit 3abe47ae9e
32 changed files with 76 additions and 87 deletions

View File

@ -5,11 +5,11 @@ using Microsoft.AspNetCore.Http;
using Oqtane.Shared;
using Oqtane.Enums;
using Oqtane.Infrastructure;
using [Owner].[Module].Repository;
using [Owner].Module.[Module].Repository;
using Oqtane.Controllers;
using System.Net;
namespace [Owner].[Module].Controllers
namespace [Owner].Module.[Module].Controllers
{
[Route(ControllerRoutes.ApiRoute)]
public class [Module]Controller : ModuleControllerBase

View File

@ -7,9 +7,9 @@ using Oqtane.Models;
using Oqtane.Infrastructure;
using Oqtane.Enums;
using Oqtane.Repository;
using [Owner].[Module].Repository;
using [Owner].Module.[Module].Repository;
namespace [Owner].[Module].Manager
namespace [Owner].Module.[Module].Manager
{
public class [Module]Manager : MigratableModuleBase, IInstallable, IPortable
{
@ -32,7 +32,7 @@ namespace [Owner].[Module].Manager
return Migrate(new [Module]Context(_DBContextDependencies), tenant, MigrationType.Down);
}
public string ExportModule(Module module)
public string ExportModule(Oqtane.Models.Module module)
{
string content = "";
List<Models.[Module]> [Module]s = _[Module]Repository.Get[Module]s(module.ModuleId).ToList();
@ -43,7 +43,7 @@ namespace [Owner].[Module].Manager
return content;
}
public void ImportModule(Module module, string content, string version)
public void ImportModule(Oqtane.Models.Module module, string content, string version)
{
List<Models.[Module]> [Module]s = null;
if (!string.IsNullOrEmpty(content))

View File

@ -2,13 +2,13 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Oqtane.Databases.Interfaces;
using Oqtane.Migrations;
using [Owner].[Module].Migrations.EntityBuilders;
using [Owner].[Module].Repository;
using [Owner].Module.[Module].Migrations.EntityBuilders;
using [Owner].Module.[Module].Repository;
namespace [Owner].[Module].Migrations
namespace [Owner].Module.[Module].Migrations
{
[DbContext(typeof([Module]Context))]
[Migration("[Owner].[Module].01.00.00.00")]
[Migration("[Owner].Module.[Module].01.00.00.00")]
public class InitializeModule : MultiDatabaseMigration
{
public InitializeModule(IDatabase database) : base(database)

View File

@ -5,7 +5,7 @@ using Oqtane.Databases.Interfaces;
using Oqtane.Migrations;
using Oqtane.Migrations.EntityBuilders;
namespace [Owner].[Module].Migrations.EntityBuilders
namespace [Owner].Module.[Module].Migrations.EntityBuilders
{
public class [Module]EntityBuilder : AuditableBaseEntityBuilder<[Module]EntityBuilder>
{

View File

@ -1,7 +1,7 @@
using System.Collections.Generic;
using [Owner].[Module].Models;
using [Owner].Module.[Module].Models;
namespace [Owner].[Module].Repository
namespace [Owner].Module.[Module].Repository
{
public interface I[Module]Repository
{

View File

@ -5,7 +5,7 @@ using Oqtane.Repository;
using Oqtane.Infrastructure;
using Oqtane.Repository.Databases.Interfaces;
namespace [Owner].[Module].Repository
namespace [Owner].Module.[Module].Repository
{
public class [Module]Context : DBContextBase, ITransientService, IMultiDatabase
{

View File

@ -2,9 +2,9 @@ using Microsoft.EntityFrameworkCore;
using System.Linq;
using System.Collections.Generic;
using Oqtane.Modules;
using [Owner].[Module].Models;
using [Owner].Module.[Module].Models;
namespace [Owner].[Module].Repository
namespace [Owner].Module.[Module].Repository
{
public class [Module]Repository : I[Module]Repository, ITransientService
{

View File

@ -4,12 +4,12 @@
<TargetFramework>net7.0</TargetFramework>
<AddRazorSupportForMvc>true</AddRazorSupportForMvc>
<Version>1.0.0</Version>
<Product>[Owner].[Module]</Product>
<Product>[Owner].Module.[Module]</Product>
<Authors>[Owner]</Authors>
<Company>[Owner]</Company>
<Description>[Description]</Description>
<Copyright>[Owner]</Copyright>
<AssemblyName>[Owner].[Module].Server.Oqtane</AssemblyName>
<AssemblyName>[Owner].Module.[Module].Server.Oqtane</AssemblyName>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
</PropertyGroup>
@ -26,7 +26,7 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Shared\[Owner].[Module].Shared.csproj" />
<ProjectReference Include="..\Shared\[Owner].Module.[Module].Shared.csproj" />
</ItemGroup>
<ItemGroup>

View File

@ -1,5 +1,5 @@
/* Module Script */
var [Owner] = [Owner] || {};
[Owner].[Module] = {
[Owner].Module.[Module] = {
};