logo

C# and ASP.NET: A Powerhouse Combination

   

Added on  2019-09-16

12 Pages2581 Words488 Views
 | 
 | 
 | 
HRSC DocumentSystem Requirements to Run the ProjectAny modern computer systemVisual Studio 2017 any editionSql server LocalDbDotNet Framework 4.6 or aboveWindows os 7 or aboveAny Modern Browser example - chrome, firefox, IEInstructions to Run the ProjectMoveto solution fileOpen HRSC.sln file inside HRSC folderPress ctrl+f5 or click debug>start without debugging to runNavigate to different menus.Admin username: WhitrowAdmin password: Password100000Software Architecture Used HRSC is based on MVC software architecture. Code is categorised in model (POCO).Repository( Logic) Views(CSHTML pages) and Controllers that interact with cshtml andRepository and transfer data between them.MVC IN ASP.NET : In this section, you will get an overview of MVC architecture. The MVCarchitectural pattern has existed for a long time in software engineering. All most all thelanguages use MVC with slight variation, but conceptually it remains the same.Let's understand the MVC architecture in ASP.NET, MVC stands for Model, View and Controller. MVC separates application into three components - Model, View and Controller.
C# and ASP.NET: A Powerhouse Combination_1

Model: Model represents shape of the data and business logic. It maintains the data of the application. Model objects retrieve and store model state in a database.Model is a data and business logic.View: View is a user interface. View display data using model to the user and also enables them to modify the data.View is a User Interface.Controller: Controller handles the user request. Typically, user interact with View, which in-ternraises appropriate URL request, this request will be handled by a controller. The controllerrenders the appropriate view with the model data as a response.Controller is a request handler.The following figure illustrates the interaction between Model, View and Controller.MVC ArchitectureThe following figure illustrates the flow of the user's request in ASP.NET MVC.
C# and ASP.NET: A Powerhouse Combination_2

Request/Response in MVC ArchitectureAs per the above figure, when the user enters a URL in the browser, it goes to the server andcalls appropriate controller. Then, the Controller uses the appropriate View and Model andcreates the response and sends it back to the user. We will see the details of the interaction in thenext few sections. Points to remember :MVC stands for Model, View and Controller.Model is responsible for maintaining application data and business logic.View is a user interface of the application, which displays the data.Controller handles user's requests and renders appropriate View with Model data.Folder: In Project With Files*Note - Folder/Files that are bold are auto generated from asp.net template,Migrations folder is created when we run add-migration command in packagemanager console.HRSC HRSC ProjectApp_DataContent (bootstrap css)Scripts (Javascript files)App_StartBundleConfig.csFilterConfig.cs (Authorize filter code)
C# and ASP.NET: A Powerhouse Combination_3

IdentityConfig.cs (Authentication code)RouteConfig.cs (mvc route configuration)Startup.Auth (startup configuration)Model (POCO)AccountViewModel.cs (User Account ViewModel Classes)Corder.csCustomer.csDatabaseContext.csDepot.csIdentityModel.csManageViewModel.csOline.csProduct.csSalesRep.csStock.csSupplier.csRepositoryCOrderRepo.cs (Corder database interaction)CustRepo.cs (Customer database interaction)DepotRepo.cs (Depot database interaction)ProductRepo.cs (Product database interaction)SalesRepRepo.cs (Product database interaction)SupplierRepo (Product database interaction)ControllersHomeController.cs (Action methods for customer role)ValuesController.cs (Action methods for admin and manager role)AccountController.cs (User account related Action method)Views
C# and ASP.NET: A Powerhouse Combination_4

End of preview

Want to access all the pages? Upload your documents or become a member.

Related Documents
MVC Framework For Web Development Courses
|6
|719
|16

Web-based System for ABC University: Design and Architecture
|15
|1229
|411

MVC Framework Implementation
|4
|921
|436

Model View Controller Framework of PHP for DVD Rental Shop
|4
|755
|353

N-Tier Architecture and Its Internet Applications
|6
|949
|312

Mobile Application Activity Assignment 2022
|7
|820
|30