Skip to content

Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.

Plugin Tax.FixedRate - change type of project to Microsoft.NET.Sdk.Razor

KrzysztofPajak44dffacba474
diff --git a/src/Plugins/Tax.FixedRate/Controllers/TaxFixedRateController.cs b/src/Plugins/Tax.FixedRate/Areas/Admin/Controllers/TaxFixedRateController.cs
similarity index 91%
rename from src/Plugins/Tax.FixedRate/Controllers/TaxFixedRateController.cs
rename to src/Plugins/Tax.FixedRate/Areas/Admin/Controllers/TaxFixedRateController.cs
index f162ce81c..608c62d7a 100644
--- a/src/Plugins/Tax.FixedRate/Controllers/TaxFixedRateController.cs
+++ b/src/Plugins/Tax.FixedRate/Areas/Admin/Controllers/TaxFixedRateController.cs
@@ -29,7 +29,7 @@ namespace Tax.FixedRate.Controllers
public IActionResult Configure()
{
- return View("~/Plugins/Tax.FixedRate/Views/Configure.cshtml");
+ return View();
}
[HttpPost]
@@ -37,15 +37,13 @@ namespace Tax.FixedRate.Controllers
{
var taxRateModels = new List<FixedTaxRateModel>();
foreach (var taxCategory in await _taxCategoryService.GetAllTaxCategories())
- taxRateModels.Add(new FixedTaxRateModel
- {
+ taxRateModels.Add(new FixedTaxRateModel {
TaxCategoryId = taxCategory.Id,
TaxCategoryName = taxCategory.Name,
Rate = GetTaxRate(taxCategory.Id)
});
- var gridModel = new DataSourceResult
- {
+ var gridModel = new DataSourceResult {
Data = taxRateModels,
Total = taxRateModels.Count
};
diff --git a/src/Plugins/Tax.FixedRate/Views/Configure.cshtml b/src/Plugins/Tax.FixedRate/Areas/Admin/Views/TaxFixedRate/Configure.cshtml
similarity index 100%
rename from src/Plugins/Tax.FixedRate/Views/Configure.cshtml
rename to src/Plugins/Tax.FixedRate/Areas/Admin/Views/TaxFixedRate/Configure.cshtml
diff --git a/src/Plugins/Tax.FixedRate/Views/_ViewImports.cshtml b/src/Plugins/Tax.FixedRate/Areas/Admin/Views/_ViewImports.cshtml
similarity index 100%
rename from src/Plugins/Tax.FixedRate/Views/_ViewImports.cshtml
rename to src/Plugins/Tax.FixedRate/Areas/Admin/Views/_ViewImports.cshtml
diff --git a/src/Plugins/Tax.FixedRate/Tax.FixedRate.csproj b/src/Plugins/Tax.FixedRate/Tax.FixedRate.csproj
index fabb56804..c3184dba2 100644
--- a/src/Plugins/Tax.FixedRate/Tax.FixedRate.csproj
+++ b/src/Plugins/Tax.FixedRate/Tax.FixedRate.csproj
@@ -1,4 +1,4 @@
-<Project Sdk="Microsoft.NET.Sdk">
+<Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
@@ -7,6 +7,7 @@
<Authors>UNIT-SOFT Sp. z o.o.</Authors>
<PackageProjectUrl>https://grandnode.com/</PackageProjectUrl>
<TieredCompilation>true</TieredCompilation>
+ <AddRazorSupportForMvc>true</AddRazorSupportForMvc>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
@@ -73,12 +74,6 @@
<None Update="logo.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
- <None Update="Views\Configure.cshtml">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </None>
- <None Update="Views\_ViewImports.cshtml">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </None>
</ItemGroup>
</Project>
\ No newline at end of file