• Stars
    star
    308
  • Rank 135,712 (Top 3 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 3 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

This is a solution for creating the Razor Pages Application with ASP.NET Core(.net 7.0) following the principles of Clean Architecture

Clean Architecture Solution For Razor Pages .net 7


This is a solution template for creating a Razor Page App with ASP.NET Core following the principles of Clean Architecture. Create a new project based on this template by clicking the above Use this template button or by installing and running the associated NuGet package (see Getting Started for full details).

Learn about Clean Architecture

Clean Architecture with ASP.NET Core 7.0 • Jason Taylor • GOTO 2019

Demonstration(http://razor.i247365.net/)

Clean Architecture Solution For Razor Page Development

Technologies

Code Generator tools

How to

Github Sourcecode: https://github.com/neozhu/CleanArchitectureCodeGenerator

Getting Started

The easiest way to get started is to install the NuGet package and run dotnet new ca-sln:

  1. Install the latest .NET 7 SDK
  2. Run dotnet new --install Clean.Architecture.Solution.Template to install the project template
  3. Create a folder for your solution and cd into it (the template will use it as project name)
  4. Run dotnet new ca-sln to create a new project
  5. Navigate to src/WebUI/ClientApp and run npm install
  6. Navigate to src/WebUI/ClientApp and run npm start to launch the front end (Angular)
  7. Navigate to src/WebUI and run dotnet run to launch the back end (ASP.NET Core Web API)

Check out my blog post for more information.

Docker Configuration

In order to get Docker working, you will need to add a temporary SSL cert and mount a volume to hold that cert. You can find Microsoft Docs that describe the steps required for Windows, macOS, and Linux.

For Windows: The following will need to be executed from your terminal to create a cert dotnet dev-certs https -ep %USERPROFILE%\.aspnet\https\aspnetapp.pfx -p Your_password123 dotnet dev-certs https --trust

NOTE: When using PowerShell, replace %USERPROFILE% with $env:USERPROFILE.

FOR macOS: dotnet dev-certs https -ep ${HOME}/.aspnet/https/aspnetapp.pfx -p Your_password123 dotnet dev-certs https --trust

FOR Linux: dotnet dev-certs https -ep ${HOME}/.aspnet/https/aspnetapp.pfx -p Your_password123

In order to build and run the docker containers, execute docker-compose -f 'docker-compose.yml' up --build from the root of the solution where you find the docker-compose.yml file. You can also use "Docker Compose" from Visual Studio for Debugging purposes. Then open http://localhost:5000 on your browser.

To disable Docker in Visual Studio, right-click on the docker-compose file in the Solution Explorer and select Unload Project.

Database Configuration

The template is configured to use an in-memory database by default. This ensures that all users will be able to run the solution without needing to set up additional infrastructure (e.g. SQL Server).

If you would like to use SQL Server, you will need to update WebUI/appsettings.json as follows:

  "UseInMemoryDatabase": false,

Verify that the DefaultConnection connection string within appsettings.json points to a valid SQL Server instance.

When you run the application the database will be automatically created (if necessary) and the latest migrations will be applied.

Database Migrations

To use dotnet-ef for your migrations please add the following flags to your command (values assume you are executing from repository root)

  • --project src/Infrastructure (optional if in this folder)
  • --startup-project src/WebUI
  • --output-dir Persistence/Migrations

For example, to add a new migration from the root folder:

dotnet ef migrations add "SampleMigration" --project src\Infrastructure --startup-project src\WebUI --output-dir Persistence\Migrations

Overview

Domain

This will contain all entities, enums, exceptions, interfaces, types and logic specific to the domain layer.

Application

This layer contains all application logic. It is dependent on the domain layer, but has no dependencies on any other layer or project. This layer defines interfaces that are implemented by outside layers. For example, if the application need to access a notification service, a new interface would be added to application and an implementation would be created within infrastructure.

Infrastructure

This layer contains classes for accessing external resources such as file systems, web services, smtp, and so on. These classes should be based on interfaces defined within the application layer.

SmartAdmin - Responsive WebApp

Purchases

– an advanced UI Bootstrap 4 Admin and Dashboard – is built for the next generation. Its’ exceptional design contains vast collection of assorted reusable UI components integrated with latest jQuery plugins optimized to suit every modern web application project worldwide.

Support

If you are having problems, please let us know by raising a new issue.

License

This project is licensed with the MIT license.

More Repositories

1

CleanArchitectureWithBlazorServer

This is a repository for creating a Blazor Server dashboard application following the principles of Clean Architecture
C#
309
star
2

visitormanagement

helps in managing visitors visiting the institutions for various reasons. It allows visitors to check-in digitally to eliminate the tedious registeration and other paperwork. Additionally, it also keeps a track of every individual inside the campus and their timings. Institutions has guards who enter their detail in some notebooks to keep a log which are practically impossible to reconcile. It is really unpleasent and hectic for visitor to stand at the gate and give details about the visit. To ease the process of registeration, Entry-In, Entry-Out, time tracking and logging the history, this VMS can be of great use!!
C#
196
star
3

CleanArchitectureCodeGenerator

Generate the application features code class that conforms to the CQRS design pattern in the Application project - Visual Studio.net 2022 Extensions plugin
C#
166
star
4

smartadmin.core.urf

Domain Driven Design (DDD) lightweight development architecture(support .net 5.0)
Jupyter Notebook
106
star
5

abpvnextsmartcodegenerator

visual studio.net 2017 extension for abp vnext code generator archetype
C#
24
star
6

ctmswxapp

集装箱运输系统司机端微信小程序原型
JavaScript
19
star
7

iot_water

智慧水务物联网系统是用户单位基于智能水表(包含但不限于NB-lot水表等智能表)、智能消火栓、智能阀门、数据采集终端(RTU或PLC)及其他前置传感器和设备在供水方面的应用管理系统,由这些设备采集到监测点的各种数据
JavaScript
14
star
8

IntelliAlbum

IntelliAlbum - Intelligent Ablum With AI
C#
13
star
9

FacialRecognition

Facial Recognition With Blazor Server Application
C#
9
star
10

excelcompleximport

复杂格式excel转换,excel 转换成 xml
4
star
11

PdfGeneratorApi

This project is a Minimal APIs application built with ASP.NET Core and Playwright. It provides an API to generate PDFs from HTML content or URLs
C#
4
star
12

ctms

集装箱运输TMS系统,功能模块:订单管理,调度管理,机务管理,外部系统对接接口等常用功能,Demo http://221.224.21.30:2021/
JavaScript
4
star
13

csb-sdk.net

The CSB-SDK is a client-side invocation SDK for HTTP or Web Service API opened by the CSB (Cloud Service Bus) product. It is responsible for invoking the open API and signing the request information.
C#
3
star
14

mitms

无车承运人+TMS解决方案
3
star
15

wepyapp

食堂就餐微信小程序
JavaScript
3
star
16

SupplierBidder

该系统需求包括四个主要流程:导入、竞标、开标和交付/收货管理。操作员将询价 Excel 文件导入系统并向供应商发布询价单,供应商在截止日期前进行竞标并可进行重新报价。截止日期后,操作员审核竞标并确认中标供应商,系统通知中标供应商。在收到中标通知后,供应商将获胜标识 QR 码粘贴在包装箱外,并在收到货物时扫描 QR 码以确认产品信息和发票信息。系统还提供了查询功能和移动版本,特别授权的用户可以查看所有竞标信息但无法修改。系统界面应简单易用。
JavaScript
3
star
17

wmsrf-winceclient

C#
1
star
18

neozhu

my personal repository
1
star
19

co-worker-extension

co-worker information extension for edge
HTML
1
star
20

pegatronb2b

世硕B2B平台
JavaScript
1
star
21

Kaifa.B2B.Solution

Kaifa.B2B.Solution, BizTalk RosettaNet Project, ehub solution Data exchange with e2open, Seagate, vMIHub repository using Rosettanet protocol
HTML
1
star
22

mqtt_tutorial

mqtt with emq x broker publish/subscribe tutorial use weixin and vue client
JavaScript
1
star
23

authenticationTutorial

asp.net core authentication tutorial
C#
1
star
24

fulloflife

服务与地摊经济的微信小程序
JavaScript
1
star
25

mailscan

designed for scanning and sorting mail based on recipient information.
C#
1
star