Commit 55634097 authored by Ahmad Abd's avatar Ahmad Abd

Initial commit

parents
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from `dotnet new gitignore`
# dotenv files
.env
# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Mono auto generated files
mono_crash.*
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Ww][Ii][Nn]32/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
[Ll]ogs/
# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUnit
*.VisualState.xml
TestResult.xml
nunit-*.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET
project.lock.json
project.fragment.lock.json
artifacts/
# Tye
.tye/
# ASP.NET Scaffolding
ScaffoldingReadMe.txt
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.tlog
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Coverlet is a free, cross platform Code Coverage Tool
coverage*.json
coverage*.xml
coverage*.info
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# NuGet Symbol Packages
*.snupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
*.appxbundle
*.appxupload
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!?*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
*- [Bb]ackup.rdl
*- [Bb]ackup ([0-9]).rdl
*- [Bb]ackup ([0-9][0-9]).rdl
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio 6 auto-generated project file (contains which files were open etc.)
*.vbp
# Visual Studio 6 workspace and project file (working project files containing files to include in project)
*.dsw
*.dsp
# Visual Studio 6 technical files
*.ncb
*.aps
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# CodeRush personal settings
.cr/personal
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
# Local History for Visual Studio
.localhistory/
# Visual Studio History (VSHistory) files
.vshistory/
# BeatPulse healthcheck temp database
healthchecksdb
# Backup folder for Package Reference Convert tool in Visual Studio 2017
MigrationBackup/
# Ionide (cross platform F# VS Code tools) working folder
.ionide/
# Fody - auto-generated XML schema
FodyWeavers.xsd
# VS Code files for those working on multiple tools
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace
# Local History for Visual Studio Code
.history/
# Windows Installer files from build outputs
*.cab
*.msi
*.msix
*.msm
*.msp
# JetBrains Rider
*.sln.iml
.idea
##
## Visual studio for Mac
##
# globs
Makefile.in
*.userprefs
*.usertasks
config.make
config.status
aclocal.m4
install-sh
autom4te.cache/
*.tar.gz
tarballs/
test-results/
# Mac bundle stuff
*.dmg
*.app
# content below from: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore
# General
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
# content below from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore
# Windows thumbnail cache files
Thumbs.db
ehthumbs.db
ehthumbs_vista.db
# Dump file
*.stackdump
# Folder config file
[Dd]esktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp
# Windows shortcuts
*.lnk
# Vim temporary swap files
*.swp
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ModularShop.Web", "src\ModularShop.Web\ModularShop.Web.csproj", "{1D703F1A-CC8B-51CE-BC23-78E52442CDDB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ModularShop.Products.Contracts", "src\ModularShop.Products.Contracts\ModularShop.Products.Contracts.csproj", "{080ED7E9-368E-5501-9C45-319CD10D2EB8}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ModularShop.Products", "src\ModularShop.Products\ModularShop.Products.csproj", "{E3AAD3F8-D561-5DD8-9CF9-404156136311}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ModularShop.Orders", "src\ModularShop.Orders\ModularShop.Orders.csproj", "{0FE2AAA4-923C-5016-9A38-3FCBDBB6F2A1}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{1D703F1A-CC8B-51CE-BC23-78E52442CDDB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1D703F1A-CC8B-51CE-BC23-78E52442CDDB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1D703F1A-CC8B-51CE-BC23-78E52442CDDB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1D703F1A-CC8B-51CE-BC23-78E52442CDDB}.Release|Any CPU.Build.0 = Release|Any CPU
{080ED7E9-368E-5501-9C45-319CD10D2EB8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{080ED7E9-368E-5501-9C45-319CD10D2EB8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{080ED7E9-368E-5501-9C45-319CD10D2EB8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{080ED7E9-368E-5501-9C45-319CD10D2EB8}.Release|Any CPU.Build.0 = Release|Any CPU
{E3AAD3F8-D561-5DD8-9CF9-404156136311}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E3AAD3F8-D561-5DD8-9CF9-404156136311}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E3AAD3F8-D561-5DD8-9CF9-404156136311}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E3AAD3F8-D561-5DD8-9CF9-404156136311}.Release|Any CPU.Build.0 = Release|Any CPU
{0FE2AAA4-923C-5016-9A38-3FCBDBB6F2A1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0FE2AAA4-923C-5016-9A38-3FCBDBB6F2A1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0FE2AAA4-923C-5016-9A38-3FCBDBB6F2A1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0FE2AAA4-923C-5016-9A38-3FCBDBB6F2A1}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
# ModularShop — Modular Monolith Teaching Demo (.NET 8)
This demo performs the same product-availability order simulation as the previous two-service microservices demo, but **runs as one ASP.NET Core web application**. Product and Order modules are separate .NET class libraries with a defined interface boundary.
## Open and run in Visual Studio
1. Extract the ZIP.
2. Open `ModularShop.sln` in **Visual Studio 2022** with .NET 8 SDK and ASP.NET and web development workload.
3. Right-click **ModularShop.Web** → **Set as Startup Project**.
4. Build Solution (`Ctrl+Shift+B`).
5. Run the Web project. Open `http://localhost:5003` if it does not launch automatically.
6. Enter **Laptop** (success), **Phone** (failure).
> The port is set to 5003 in `src/ModularShop.Web/Program.cs`. No database or NuGet packages are required.
## Projects and dependencies
```text
ModularShop.Web (ASP.NET Core Razor Pages — single executable)
|---> ModularShop.Orders (Order module)
| |---> ModularShop.Products.Contracts
|
+---> ModularShop.Products (Product module)
|---> ModularShop.Products.Contracts
ModularShop.Products.Contracts (public interface IProductCatalog)
```
`ModularShop.Orders` does **not** reference `ModularShop.Products`. It knows only the public interface. The product implementation and repository are `internal`, so other modules cannot call their internals directly.
`ModularShop.Web` is the only runnable application. The class libraries are compiled into it and are NOT separately deployed as services.
## Run-time flow
1. Browser POSTs the Razor Page form to `/`.
2. ASP.NET Core calls `IndexModel.OnPost()`.
3. `IndexModel` calls `IOrderService.PlaceOrder()` (in-process call).
4. `OrderService` calls `IProductCatalog.IsAvailable()` (in-process call through a contract).
5. `ProductCatalog` checks `ProductRepository`'s in-memory product set.
6. Result is returned through the same call chain and shown on the page.
## Step-by-step build from scratch (Visual Studio)
1. Create a **Blank Solution** named `ModularShop`.
2. Add **ASP.NET Core Web App (Razor Pages)** named `ModularShop.Web`, targeting **.NET 8**.
3. Add three **Class Library** projects named `ModularShop.Products.Contracts`, `ModularShop.Products`, and `ModularShop.Orders`, all targeting **.NET 8**.
4. Add project references:
- `ModularShop.Products` → `ModularShop.Products.Contracts`
- `ModularShop.Orders` → `ModularShop.Products.Contracts`
- `ModularShop.Web` → `ModularShop.Products` and `ModularShop.Orders`
5. In the two module project `.csproj` files, add `<FrameworkReference Include="Microsoft.AspNetCore.App" />` in an `<ItemGroup>` to enable use of ASP.NET Core's dependency-injection registration without additional packages.
6. Create the classes/files from the extracted project, keeping namespaces as shown.
7. Register both modules in the Web project's `Program.cs`.
8. Set `ModularShop.Web` as startup project and run.
## Lesson notes
- **Monolith**: one runnable/deployable backend (`ModularShop.Web`).
- **Modular**: code is grouped by business capability into Products and Orders modules, not only global folders such as `Services` and `Repositories`.
- **Encapsulation**: product implementation classes are `internal`, and other modules use the public contract `IProductCatalog`.
- **Layering inside a module**: Products module has a domain-facing product catalog and a repository. Modules and layers describe two different ways of looking at the same software.
- **Communication**: no HTTP between modules; it is ordinary in-process C# method calls. Compare with the earlier microservices version where OrderService used `HttpClient` to call ProductService over HTTP.
- **Data**: demonstration uses an in-memory collection. No actual orders are saved, and product data resets at process restart.
### Student exercise
- Add `Monitor` to the repository's product set and verify it can be ordered.
- Try to access `ProductRepository` directly from the Orders project. Explain why the design prevents it.
- Change `IProductCatalog.IsAvailable` and show the two projects needing the interface change.
namespace ModularShop.Orders;
// Contract used by the web host to place an order.
public interface IOrderService
{
OrderResult PlaceOrder(string? productName);
}
public sealed record OrderResult(bool IsSuccess, string Message);
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
<ProjectReference Include="..\ModularShop.Products.Contracts\ModularShop.Products.Contracts.csproj" />
</ItemGroup>
</Project>
using Microsoft.Extensions.DependencyInjection;
namespace ModularShop.Orders;
// Public entry point for wiring up the Order module.
public static class OrderModuleRegistration
{
public static IServiceCollection AddOrdersModule(this IServiceCollection services)
{
services.AddScoped<IOrderService, OrderService>();
return services;
}
}
using ModularShop.Products.Contracts;
namespace ModularShop.Orders;
// This implementation depends on the Product module's PUBLIC CONTRACT only.
internal sealed class OrderService : IOrderService
{
private readonly IProductCatalog _catalog;
public OrderService(IProductCatalog catalog)
{
_catalog = catalog;
}
public OrderResult PlaceOrder(string? productName)
{
var name = productName?.Trim() ?? "";
if (name.Length == 0)
return new(false, "Please enter a product name.");
if (!_catalog.IsAvailable(name))
return new(false, $"Failed. {name} does not exist in the catalog.");
// This is a teaching simulation: no order is persisted.
return new(true, $"Success! Order placed for {name}.");
}
}
namespace ModularShop.Products.Contracts;
// The public API that other modules are allowed to use.
public interface IProductCatalog
{
bool IsAvailable(string productName);
}
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
<ProjectReference Include="..\ModularShop.Products.Contracts\ModularShop.Products.Contracts.csproj" />
</ItemGroup>
</Project>
using ModularShop.Products.Contracts;
namespace ModularShop.Products;
// Product-module implementation hidden behind the public IProductCatalog contract.
internal sealed class ProductCatalog : IProductCatalog
{
private readonly ProductRepository _repository;
public ProductCatalog(ProductRepository repository)
{
_repository = repository;
}
public bool IsAvailable(string productName) =>
!string.IsNullOrWhiteSpace(productName) &&
_repository.Exists(productName.Trim());
}
using Microsoft.Extensions.DependencyInjection;
using ModularShop.Products.Contracts;
namespace ModularShop.Products;
// Public entry point for wiring up the Product module.
public static class ProductModuleRegistration
{
public static IServiceCollection AddProductsModule(this IServiceCollection services)
{
services.AddSingleton<ProductRepository>();
services.AddScoped<IProductCatalog, ProductCatalog>();
return services;
}
}
namespace ModularShop.Products;
// Internal: the Orders module must not access Product data directly.
internal sealed class ProductRepository
{
private static readonly HashSet<string> Products =
new(StringComparer.OrdinalIgnoreCase) { "Laptop", "Mouse", "Keyboard" };
public bool Exists(string productName) => Products.Contains(productName);
}
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\ModularShop.Products\ModularShop.Products.csproj" />
<ProjectReference Include="..\ModularShop.Orders\ModularShop.Orders.csproj" />
</ItemGroup>
</Project>
@page
@model IndexModel
@{
ViewData["Title"] = "Modular Monolith Demo";
Layout = null;
}
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>@ViewData["Title"]</title>
<style>
body { font-family: Segoe UI, Arial, sans-serif; background: #f5f7fb; margin: 0; color: #20283a; }
main { max-width: 620px; margin: 75px auto; padding: 30px; border-radius: 14px; background: white; box-shadow: 0 8px 30px #1c25401a; }
h1 { margin-top: 0; }
label { display: block; font-weight: 600; margin-bottom: 8px; }
input { width: 100%; box-sizing: border-box; padding: 12px; border: 1px solid #b9c2d1; border-radius: 7px; margin-bottom: 12px; }
button { background: #2563eb; color: white; border: 0; border-radius: 7px; padding: 12px 18px; cursor: pointer; }
.hint { color: #64748b; }
.result { margin-top: 16px; font-weight: 600; }
.ok { color: #16803a; } .error { color: #c53232; }
code { background: #eef1f5; padding: 2px 4px; border-radius: 4px; }
</style>
</head>
<body>
<main>
<h1>Modular Monolith: Shopping Demo</h1>
<p>One ASP.NET Core application with separate <strong>Orders</strong> and <strong>Products</strong> modules.</p>
<p class="hint">Available products: Laptop, Mouse, Keyboard</p>
<form method="post">
<label asp-for="ProductName">Product name</label>
<input asp-for="ProductName" placeholder="e.g., Laptop" autocomplete="off" />
<button type="submit">Place Order</button>
</form>
@if (Model.ResultMessage is not null)
{
<p class="result @(Model.IsSuccess ? "ok" : "error")" role="status">@Model.ResultMessage</p>
}
<hr />
<p class="hint">Flow: <code>IndexModel</code> → <code>IOrderService</code> → <code>IProductCatalog</code> → in-memory products</p>
</main>
</body>
</html>
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using ModularShop.Orders;
namespace ModularShop.Web.Pages;
public class IndexModel : PageModel
{
private readonly IOrderService _orders;
public IndexModel(IOrderService orders)
{
_orders = orders;
}
[BindProperty]
public string? ProductName { get; set; }
public string? ResultMessage { get; private set; }
public bool IsSuccess { get; private set; }
public void OnPost()
{
// Browser -> Razor Page -> Orders module (C# method call).
var result = _orders.PlaceOrder(ProductName);
ResultMessage = result.Message;
IsSuccess = result.IsSuccess;
}
}
@using ModularShop.Web
@namespace ModularShop.Web.Pages
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
using ModularShop.Orders;
using ModularShop.Products;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddRazorPages();
// Both business modules are loaded into THIS ONE application.
builder.Services.AddProductsModule();
builder.Services.AddOrdersModule();
builder.WebHost.UseUrls("http://localhost:5003");
var app = builder.Build();
app.UseRouting();
app.MapRazorPages();
app.Run();
{
"$schema": "http://json.schemastore.org/launchsettings.json",
"profiles": {
"ModularShop.Web": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "http://localhost:5003",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment