C# and ASP.NET: A Powerhouse Combination
Added on 2019-09-16
12 Pages2581 Words488 Views
|
|
|
HRSC DocumentSystem Requirements to Run the Project●Any modern computer system●Visual Studio 2017 any edition●Sql server LocalDb●DotNet Framework 4.6 or above●Windows os 7 or above●Any Modern Browser example - chrome, firefox, IEInstructions to Run the Project●Moveto solution file●Open HRSC.sln file inside HRSC folder●Press ctrl+f5 or click debug>start without debugging to run●Navigate to different menus.●Admin username: Whitrow●Admin 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](/_next/image/?url=https%3A%2F%2Fdesklib.com%2Fmedia%2Fimages%2F6a5637a53c8347d3a23770ab9cdc6f90.jpg&w=3840&q=10)
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](/_next/image/?url=https%3A%2F%2Fdesklib.com%2Fmedia%2Fimages%2F6931b4fa0b9b456c8d66d5efcf93aa79.jpg&w=3840&q=10)
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 Project●App_Data●Content (bootstrap css)●Scripts (Javascript files)●App_Start○BundleConfig.cs○FilterConfig.cs (Authorize filter code)
![C# and ASP.NET: A Powerhouse Combination_3](/_next/image/?url=https%3A%2F%2Fdesklib.com%2Fmedia%2Fimages%2Fcd389de2c24c41118fd96efeb44b08f4.jpg&w=3840&q=10)
○IdentityConfig.cs (Authentication code)○RouteConfig.cs (mvc route configuration)○Startup.Auth (startup configuration)●Model (POCO)○AccountViewModel.cs (User Account ViewModel Classes)○Corder.cs○Customer.cs○DatabaseContext.cs○Depot.cs○IdentityModel.cs○ManageViewModel.cs○Oline.cs○Product.cs○SalesRep.cs○Stock.cs○Supplier.cs●Repository○COrderRepo.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)●Controllers○HomeController.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](/_next/image/?url=https%3A%2F%2Fdesklib.com%2Fmedia%2Fimages%2F40ee0c3655294e278c0727247dccb2cc.jpg&w=3840&q=10)
End of preview
Want to access all the pages? Upload your documents or become a member.
Related Documents
MVC Framework For Web Development Courseslg...
|6
|719
|16
Web-based System for ABC University: Design and Architecturelg...
|15
|1229
|411
MVC Framework Implementationlg...
|4
|921
|436
Model View Controller Framework of PHP for DVD Rental Shoplg...
|4
|755
|353
N-Tier Architecture and Its Internet Applicationslg...
|6
|949
|312
Mobile Application Activity Assignment 2022lg...
|7
|820
|30