diff --git a/modules/virtual-file-explorer/.abpstudio/state.json b/modules/virtual-file-explorer/.abpstudio/state.json new file mode 100644 index 0000000000..b0ef88d2f2 --- /dev/null +++ b/modules/virtual-file-explorer/.abpstudio/state.json @@ -0,0 +1,11 @@ +{ + "selectedKubernetesProfile": null, + "solutionRunner": { + "selectedProfile": null, + "targetFrameworks": [], + "applicationsStartingWithoutBuild": [], + "applicationsWithoutAutoRefreshBrowserOnRestart": [], + "applicationBatchStartStates": [], + "folderBatchStartStates": [] + } +} \ No newline at end of file diff --git a/modules/virtual-file-explorer/Volo.Abp.VirtualFileExplorer.abpmdl b/modules/virtual-file-explorer/Volo.Abp.VirtualFileExplorer.abpmdl index da762d4de9..d5210d1e6b 100644 --- a/modules/virtual-file-explorer/Volo.Abp.VirtualFileExplorer.abpmdl +++ b/modules/virtual-file-explorer/Volo.Abp.VirtualFileExplorer.abpmdl @@ -7,10 +7,10 @@ }, "packages": { "Volo.Abp.VirtualFileExplorer.DemoApp": { - "path": "app/DempApp.abppkg", + "path": "app/DemoApp.abppkg", "folder": "app" }, - "Volo.Abp.VirtualFileExplorer.Web": { + "Volo.Abp.VirtualFileExplorer.Contracts": { "path": "src/Volo.Abp.VirtualFileExplorer.Contracts/Volo.Abp.VirtualFileExplorer.Contracts.abppkg", "folder": "src" }, diff --git a/modules/virtual-file-explorer/Volo.Abp.VirtualFileExplorer.abpsln b/modules/virtual-file-explorer/Volo.Abp.VirtualFileExplorer.abpsln index 264a302af3..73a99eb6c5 100644 --- a/modules/virtual-file-explorer/Volo.Abp.VirtualFileExplorer.abpsln +++ b/modules/virtual-file-explorer/Volo.Abp.VirtualFileExplorer.abpsln @@ -3,5 +3,6 @@ "Volo.Abp.VirtualFileExplorer": { "path": "Volo.Abp.VirtualFileExplorer.abpmdl" } - } + }, + "id": "d900c5b2-d907-4abb-bc38-b72f80006fe0" } \ No newline at end of file diff --git a/modules/virtual-file-explorer/Volo.Abp.VirtualFileExplorer.sln b/modules/virtual-file-explorer/Volo.Abp.VirtualFileExplorer.sln index a891f0d011..da8e8f67d4 100644 --- a/modules/virtual-file-explorer/Volo.Abp.VirtualFileExplorer.sln +++ b/modules/virtual-file-explorer/Volo.Abp.VirtualFileExplorer.sln @@ -13,7 +13,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.VirtualFileExplore EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.VirtualFileExplorer.Contracts", "src\Volo.Abp.VirtualFileExplorer.Contracts\Volo.Abp.VirtualFileExplorer.Contracts.csproj", "{21FC5247-29FF-4D02-BB6A-8A739AC5640D}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DempApp", "app\DempApp.csproj", "{C447E4F2-7FCA-49B6-8249-7E04C9E26BAD}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DemoApp", "app\DemoApp.csproj", "{C447E4F2-7FCA-49B6-8249-7E04C9E26BAD}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/modules/virtual-file-explorer/app/Data/DempAppDbContext.cs b/modules/virtual-file-explorer/app/Data/DemoAppDbContext.cs similarity index 71% rename from modules/virtual-file-explorer/app/Data/DempAppDbContext.cs rename to modules/virtual-file-explorer/app/Data/DemoAppDbContext.cs index 8d952441e8..ee3ec23421 100644 --- a/modules/virtual-file-explorer/app/Data/DempAppDbContext.cs +++ b/modules/virtual-file-explorer/app/Data/DemoAppDbContext.cs @@ -1,22 +1,22 @@ -using Microsoft.EntityFrameworkCore; -using Volo.Abp.EntityFrameworkCore; -using Volo.Abp.Identity.EntityFrameworkCore; -using Volo.Abp.PermissionManagement.EntityFrameworkCore; - -namespace DempApp.Data; - -public class DempAppDbContext : AbpDbContext -{ - public DempAppDbContext(DbContextOptions options) - : base(options) - { - } - - protected override void OnModelCreating(ModelBuilder builder) - { - base.OnModelCreating(builder); - - builder.ConfigurePermissionManagement(); - builder.ConfigureIdentity(); - } -} +using Microsoft.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore; +using Volo.Abp.Identity.EntityFrameworkCore; +using Volo.Abp.PermissionManagement.EntityFrameworkCore; + +namespace DemoApp.Data; + +public class DemoAppDbContext : AbpDbContext +{ + public DemoAppDbContext(DbContextOptions options) + : base(options) + { + } + + protected override void OnModelCreating(ModelBuilder builder) + { + base.OnModelCreating(builder); + + builder.ConfigurePermissionManagement(); + builder.ConfigureIdentity(); + } +} diff --git a/modules/virtual-file-explorer/app/Data/DempAppDbContextFactory.cs b/modules/virtual-file-explorer/app/Data/DemoAppDbContextFactory.cs similarity index 61% rename from modules/virtual-file-explorer/app/Data/DempAppDbContextFactory.cs rename to modules/virtual-file-explorer/app/Data/DemoAppDbContextFactory.cs index 6813ea335b..1f0d7e56c4 100644 --- a/modules/virtual-file-explorer/app/Data/DempAppDbContextFactory.cs +++ b/modules/virtual-file-explorer/app/Data/DemoAppDbContextFactory.cs @@ -1,26 +1,26 @@ -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Design; - -namespace DempApp.Data; - -public class DempAppDbContextFactory : IDesignTimeDbContextFactory -{ - public DempAppDbContext CreateDbContext(string[] args) - { - var configuration = BuildConfiguration(); - - var builder = new DbContextOptionsBuilder() - .UseSqlServer(configuration.GetConnectionString("Default")); - - return new DempAppDbContext(builder.Options); - } - - private static IConfigurationRoot BuildConfiguration() - { - var builder = new ConfigurationBuilder() - .SetBasePath(Directory.GetCurrentDirectory()) - .AddJsonFile("appsettings.json", optional: false); - - return builder.Build(); - } -} +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Design; + +namespace DemoApp.Data; + +public class DemoAppDbContextFactory : IDesignTimeDbContextFactory +{ + public DemoAppDbContext CreateDbContext(string[] args) + { + var configuration = BuildConfiguration(); + + var builder = new DbContextOptionsBuilder() + .UseSqlServer(configuration.GetConnectionString("Default")); + + return new DemoAppDbContext(builder.Options); + } + + private static IConfigurationRoot BuildConfiguration() + { + var builder = new ConfigurationBuilder() + .SetBasePath(Directory.GetCurrentDirectory()) + .AddJsonFile("appsettings.json", optional: false); + + return builder.Build(); + } +} diff --git a/modules/virtual-file-explorer/app/DemoApp.abppkg b/modules/virtual-file-explorer/app/DemoApp.abppkg new file mode 100644 index 0000000000..48875c29cf --- /dev/null +++ b/modules/virtual-file-explorer/app/DemoApp.abppkg @@ -0,0 +1,3 @@ +{ + "role": "host.mvc" +} \ No newline at end of file diff --git a/modules/virtual-file-explorer/app/DempApp.csproj b/modules/virtual-file-explorer/app/DemoApp.csproj similarity index 100% rename from modules/virtual-file-explorer/app/DempApp.csproj rename to modules/virtual-file-explorer/app/DemoApp.csproj diff --git a/modules/virtual-file-explorer/app/DempAppModule.cs b/modules/virtual-file-explorer/app/DemoAppModule.cs similarity index 92% rename from modules/virtual-file-explorer/app/DempAppModule.cs rename to modules/virtual-file-explorer/app/DemoAppModule.cs index 3365905621..ae03d3f2ed 100644 --- a/modules/virtual-file-explorer/app/DempAppModule.cs +++ b/modules/virtual-file-explorer/app/DemoAppModule.cs @@ -1,134 +1,134 @@ -using DempApp.Data; -using Microsoft.EntityFrameworkCore; -using Volo.Abp; -using Volo.Abp.Account; -using Volo.Abp.Account.Web; -using Volo.Abp.AspNetCore.Mvc; -using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic; -using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared; -using Volo.Abp.AspNetCore.Serilog; -using Volo.Abp.Autofac; -using Volo.Abp.AutoMapper; -using Volo.Abp.Data; -using Volo.Abp.EntityFrameworkCore; -using Volo.Abp.EntityFrameworkCore.SqlServer; -using Volo.Abp.Identity; -using Volo.Abp.Identity.EntityFrameworkCore; -using Volo.Abp.Identity.Web; -using Volo.Abp.Localization; -using Volo.Abp.Modularity; -using Volo.Abp.MultiTenancy; -using Volo.Abp.PermissionManagement; -using Volo.Abp.PermissionManagement.EntityFrameworkCore; -using Volo.Abp.PermissionManagement.HttpApi; -using Volo.Abp.PermissionManagement.Identity; -using Volo.Abp.PermissionManagement.Web; -using Volo.Abp.Swashbuckle; -using Volo.Abp.VirtualFileExplorer.Web; - -namespace DempApp; - -[DependsOn( - // ABP Framework packages - typeof(AbpAspNetCoreMvcModule), - typeof(AbpAutofacModule), - typeof(AbpAutoMapperModule), - typeof(AbpSwashbuckleModule), - typeof(AbpAspNetCoreSerilogModule), - - // basic-theme - typeof(AbpAspNetCoreMvcUiBasicThemeModule), - - // VirtualFileExplorer module packages - typeof(AbpVirtualFileExplorerWebModule), - - // Account module packages - typeof(AbpAccountWebModule), - typeof(AbpAccountHttpApiModule), - typeof(AbpAccountApplicationModule), - - // Identity module packages - typeof(AbpPermissionManagementDomainIdentityModule), - typeof(AbpIdentityWebModule), - typeof(AbpIdentityHttpApiModule), - typeof(AbpIdentityApplicationModule), - typeof(AbpIdentityEntityFrameworkCoreModule), - - // Permission Management module packages - typeof(AbpPermissionManagementWebModule), - typeof(AbpPermissionManagementApplicationModule), - typeof(AbpPermissionManagementHttpApiModule), - typeof(AbpPermissionManagementEntityFrameworkCoreModule), - typeof(AbpEntityFrameworkCoreSqlServerModule) -)] -public class DempAppModule : AbpModule -{ - public override void ConfigureServices(ServiceConfigurationContext context) - { - Configure(options => - { - options.SaveStaticPermissionsToDatabase = false; - }); - - Configure(options => - { - options.IsEnabled = true; - }); - - Configure(options => - { - options.Languages.Add(new LanguageInfo("en", "en", "English")); - options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe")); - options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "简体中文")); - }); - - context.Services.AddAbpDbContext(options => - { - options.AddDefaultRepositories(includeAllEntities: true); - }); - - Configure(options => - { - options.Configure(configurationContext => - { - configurationContext.UseSqlServer(); - }); - }); - } - - public async override Task OnApplicationInitializationAsync(ApplicationInitializationContext context) - { - await context.ServiceProvider - .GetRequiredService() - .Database - .MigrateAsync(); - - await context.ServiceProvider - .GetRequiredService() - .SeedAsync(); - - var app = context.GetApplicationBuilder(); - var env = context.GetEnvironment(); - - if (env.IsDevelopment()) - { - app.UseDeveloperExceptionPage(); - } - - app.UseAbpRequestLocalization(); - - if (!env.IsDevelopment()) - { - app.UseErrorPage(); - } - - app.MapAbpStaticAssets(); - - app.UseRouting(); - app.UseUnitOfWork(); - app.UseAuthentication(); - app.UseMultiTenancy(); - app.UseAuthorization(); - app.UseConfiguredEndpoints(); - } -} +using DemoApp.Data; +using Microsoft.EntityFrameworkCore; +using Volo.Abp; +using Volo.Abp.Account; +using Volo.Abp.Account.Web; +using Volo.Abp.AspNetCore.Mvc; +using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic; +using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared; +using Volo.Abp.AspNetCore.Serilog; +using Volo.Abp.Autofac; +using Volo.Abp.AutoMapper; +using Volo.Abp.Data; +using Volo.Abp.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore.SqlServer; +using Volo.Abp.Identity; +using Volo.Abp.Identity.EntityFrameworkCore; +using Volo.Abp.Identity.Web; +using Volo.Abp.Localization; +using Volo.Abp.Modularity; +using Volo.Abp.MultiTenancy; +using Volo.Abp.PermissionManagement; +using Volo.Abp.PermissionManagement.EntityFrameworkCore; +using Volo.Abp.PermissionManagement.HttpApi; +using Volo.Abp.PermissionManagement.Identity; +using Volo.Abp.PermissionManagement.Web; +using Volo.Abp.Swashbuckle; +using Volo.Abp.VirtualFileExplorer.Web; + +namespace DemoApp; + +[DependsOn( + // ABP Framework packages + typeof(AbpAspNetCoreMvcModule), + typeof(AbpAutofacModule), + typeof(AbpAutoMapperModule), + typeof(AbpSwashbuckleModule), + typeof(AbpAspNetCoreSerilogModule), + + // basic-theme + typeof(AbpAspNetCoreMvcUiBasicThemeModule), + + // VirtualFileExplorer module packages + typeof(AbpVirtualFileExplorerWebModule), + + // Account module packages + typeof(AbpAccountWebModule), + typeof(AbpAccountHttpApiModule), + typeof(AbpAccountApplicationModule), + + // Identity module packages + typeof(AbpPermissionManagementDomainIdentityModule), + typeof(AbpIdentityWebModule), + typeof(AbpIdentityHttpApiModule), + typeof(AbpIdentityApplicationModule), + typeof(AbpIdentityEntityFrameworkCoreModule), + + // Permission Management module packages + typeof(AbpPermissionManagementWebModule), + typeof(AbpPermissionManagementApplicationModule), + typeof(AbpPermissionManagementHttpApiModule), + typeof(AbpPermissionManagementEntityFrameworkCoreModule), + typeof(AbpEntityFrameworkCoreSqlServerModule) +)] +public class DemoAppModule : AbpModule +{ + public override void ConfigureServices(ServiceConfigurationContext context) + { + Configure(options => + { + options.SaveStaticPermissionsToDatabase = false; + }); + + Configure(options => + { + options.IsEnabled = true; + }); + + Configure(options => + { + options.Languages.Add(new LanguageInfo("en", "en", "English")); + options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe")); + options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "简体中文")); + }); + + context.Services.AddAbpDbContext(options => + { + options.AddDefaultRepositories(includeAllEntities: true); + }); + + Configure(options => + { + options.Configure(configurationContext => + { + configurationContext.UseSqlServer(); + }); + }); + } + + public async override Task OnApplicationInitializationAsync(ApplicationInitializationContext context) + { + await context.ServiceProvider + .GetRequiredService() + .Database + .MigrateAsync(); + + await context.ServiceProvider + .GetRequiredService() + .SeedAsync(); + + var app = context.GetApplicationBuilder(); + var env = context.GetEnvironment(); + + if (env.IsDevelopment()) + { + app.UseDeveloperExceptionPage(); + } + + app.UseAbpRequestLocalization(); + + if (!env.IsDevelopment()) + { + app.UseErrorPage(); + } + + app.MapAbpStaticAssets(); + + app.UseRouting(); + app.UseUnitOfWork(); + app.UseAuthentication(); + app.UseMultiTenancy(); + app.UseAuthorization(); + app.UseConfiguredEndpoints(); + } +} diff --git a/modules/virtual-file-explorer/app/Migrations/20250315060727_Initial.Designer.cs b/modules/virtual-file-explorer/app/Migrations/20250315060727_Initial.Designer.cs index f5689f0394..016aade1a7 100644 --- a/modules/virtual-file-explorer/app/Migrations/20250315060727_Initial.Designer.cs +++ b/modules/virtual-file-explorer/app/Migrations/20250315060727_Initial.Designer.cs @@ -1,6 +1,6 @@ // using System; -using DempApp.Data; +using DemoApp.Data; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; @@ -10,9 +10,9 @@ using Volo.Abp.EntityFrameworkCore; #nullable disable -namespace DempApp.Migrations +namespace DemoApp.Migrations { - [DbContext(typeof(DempAppDbContext))] + [DbContext(typeof(DemoAppDbContext))] [Migration("20250315060727_Initial")] partial class Initial { diff --git a/modules/virtual-file-explorer/app/Migrations/20250315060727_Initial.cs b/modules/virtual-file-explorer/app/Migrations/20250315060727_Initial.cs index 8b353d522e..1fc66a9503 100644 --- a/modules/virtual-file-explorer/app/Migrations/20250315060727_Initial.cs +++ b/modules/virtual-file-explorer/app/Migrations/20250315060727_Initial.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore.Migrations; #nullable disable -namespace DempApp.Migrations +namespace DemoApp.Migrations { /// public partial class Initial : Migration diff --git a/modules/virtual-file-explorer/app/Migrations/DempAppDbContextModelSnapshot.cs b/modules/virtual-file-explorer/app/Migrations/DemoAppDbContextModelSnapshot.cs similarity index 99% rename from modules/virtual-file-explorer/app/Migrations/DempAppDbContextModelSnapshot.cs rename to modules/virtual-file-explorer/app/Migrations/DemoAppDbContextModelSnapshot.cs index 4a7e384098..2dc39f2526 100644 --- a/modules/virtual-file-explorer/app/Migrations/DempAppDbContextModelSnapshot.cs +++ b/modules/virtual-file-explorer/app/Migrations/DemoAppDbContextModelSnapshot.cs @@ -1,6 +1,6 @@ // using System; -using DempApp.Data; +using DemoApp.Data; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; @@ -9,10 +9,10 @@ using Volo.Abp.EntityFrameworkCore; #nullable disable -namespace DempApp.Migrations +namespace DemoApp.Migrations { - [DbContext(typeof(DempAppDbContext))] - partial class DempAppDbContextModelSnapshot : ModelSnapshot + [DbContext(typeof(DemoAppDbContext))] + partial class DemoAppDbContextModelSnapshot : ModelSnapshot { protected override void BuildModel(ModelBuilder modelBuilder) { diff --git a/modules/virtual-file-explorer/app/Pages/Index.cshtml b/modules/virtual-file-explorer/app/Pages/Index.cshtml index 110eaae2e8..2b4fd37270 100644 --- a/modules/virtual-file-explorer/app/Pages/Index.cshtml +++ b/modules/virtual-file-explorer/app/Pages/Index.cshtml @@ -1,4 +1,4 @@ @page @using Volo.Abp.Users -@model DempApp.Pages.IndexModel +@model DemoApp.Pages.IndexModel @inject ICurrentUser CurrentUser diff --git a/modules/virtual-file-explorer/app/Pages/Index.cshtml.cs b/modules/virtual-file-explorer/app/Pages/Index.cshtml.cs index 2f6f92e8ad..5f8da0f725 100644 --- a/modules/virtual-file-explorer/app/Pages/Index.cshtml.cs +++ b/modules/virtual-file-explorer/app/Pages/Index.cshtml.cs @@ -1,6 +1,6 @@ using Volo.Abp.AspNetCore.Mvc.UI.RazorPages; -namespace DempApp.Pages; +namespace DemoApp.Pages; public class IndexModel : AbpPageModel { diff --git a/modules/virtual-file-explorer/app/Program.cs b/modules/virtual-file-explorer/app/Program.cs index 7fddb1ad48..3471652b7c 100644 --- a/modules/virtual-file-explorer/app/Program.cs +++ b/modules/virtual-file-explorer/app/Program.cs @@ -1,7 +1,7 @@ using Serilog; using Serilog.Events; -namespace DempApp; +namespace DemoApp; public class Program { @@ -21,10 +21,10 @@ public class Program .UseAutofac() .UseSerilog(); - await builder.AddApplicationAsync(); + await builder.AddApplicationAsync(); var app = builder.Build(); await app.InitializeApplicationAsync(); - Log.Information("Starting DempApp."); + Log.Information("Starting DemoApp."); await app.RunAsync(); return 0; } @@ -35,7 +35,7 @@ public class Program throw; } - Log.Fatal(ex, "DempApp terminated unexpectedly!"); + Log.Fatal(ex, "DemoApp terminated unexpectedly!"); return 1; } finally diff --git a/modules/virtual-file-explorer/app/Properties/launchSettings.json b/modules/virtual-file-explorer/app/Properties/launchSettings.json index d0c5d2b101..c0680d491c 100644 --- a/modules/virtual-file-explorer/app/Properties/launchSettings.json +++ b/modules/virtual-file-explorer/app/Properties/launchSettings.json @@ -1,27 +1,27 @@ -{ - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "https://localhost:44391/", - "sslPort": 44391 - } - }, - "profiles": { - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "DempApp": { - "commandName": "Project", - "launchBrowser": true, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - }, - "applicationUrl": "https://localhost:44391/" - } - } +{ + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "https://localhost:44391/", + "sslPort": 44391 + } + }, + "profiles": { + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "DemoApp": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:44391/" + } + } } \ No newline at end of file diff --git a/modules/virtual-file-explorer/app/appsettings.json b/modules/virtual-file-explorer/app/appsettings.json index d3d23e78ee..4d1712a519 100644 --- a/modules/virtual-file-explorer/app/appsettings.json +++ b/modules/virtual-file-explorer/app/appsettings.json @@ -1,6 +1,6 @@ { "ConnectionStrings": { - "Default": "Server=localhost;Database=VirtualFileExplorerDempApp;Trusted_Connection=True;TrustServerCertificate=True" + "Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=VirtualFileExplorerDemoApp;Trusted_Connection=True;TrustServerCertificate=True" }, "Settings": { "Abp.Identity.Password.RequireNonAlphanumeric": "false",