Skip to content

Beginners Guide How to Add new functional Page

Mukesh Murugan edited this page Jun 9, 2021 · 1 revision

Domain

  • Add Entity and Properties

  • Make it child of AuditableEntity

Application

  • Add Folder - Xyz in Features

  • Add Folder Commands, Queries, Response

  • Add xyzQueryResponse in Response Folder (make it public), then add the Query in Query Folder

  • Add Command in Commands Folder (make it public)

  • Add XyzProfile in Mapping Folder, Make it Child of Profile (AutoMapper)

  • Add mapping profile for different entity and response,Commands

Server

  • Add xyzController , make it child of baseapicontroller

  • Controller Name should be as co relate to the link in route folder

  • Add Authorize with permissions and Implement Methods

Infrastructure

  • Add Entity Class in DbContext

  • PAckage Manager Console - add migrations and Update database

  • Add Repository Changes (as per required Logic)

  • Update Database Seeder

  • Infrastructure.Services.Identity In RoleServices.GetAllPermissionsAsync Add — allPermissions.GetPermissions(typeof(Permissions.XYZ), roleId);

Shared

  • Add static Xyz Class in Permisions

  • Add/ Update the PermissionModules

  • Add Cache Key in Constants.Appication.ApplicationConstans — public const string GetAllSaleInvoiceCacheKey = "all-salesinvoices";

Client.Infrastructure

  • (Add Folder XyzManager in Manager Folder)

  • Add IXyzManager Interface

  • Add XyzManager Class , Make Both Public

  • In xyzManager Implement Methods and HTTP client

  • Add XyzEndPoint.cs in Routes Folder (http link to the controller) Link name should match the controller Name.

  • Add Link to SideBar in NavMenu.razor

Client

  • Add New-Folder in Pages

  • Add Razor Component — xyz.razor

  • Add class file — xyz.razor.cs, Make it Partial

  • Add resources file in resources folder (optinal)

  • Add Manager reference in _Import

  • Add Link to SideBar in NavMenu.razor

Clone this wiki locally