Skip to content

deepan19/Brake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Brake

https://brake.azurewebsites.net/

An ASP.NET CORE MVC platform to buy/sell cars UI.png

Features & Concepts

MVC mvc.png -Model,View,Control is a design pattern commonly used. The organization of files is important (shown in image above) -Model: contains classes, objects, schemas for database -View: contains HTML and CSS that renders pages -Control: contains controllers

How it works:

When a browser sends a request, it is routed to the controller. The controller contains various CRUD operations to handle this request. THe controller will call upon the models to access data and call upon the corresponding view .cshtml file that contains the webpage's render code. THe controller then sends back this information to the browser and a webpage is loaded. Note that the model and view do not directly communicate with each other, the controller is like an intermediary to these two.

Migrations, Entity ORM

dbcontext.png

THe above is a dbcontext which is a class provided by Entity as a gateway to the DBset which queries the database in runtime.

on the NuGET package manager console:

Add-migration

update-database

These commands perform a migration where the Schema in the SQL server is updated according to the current DbContext. Entity framework helps in automating DB relating activites.

SSMS(SQL Server Management Studio) and Backend DB: ssms.png

SSMS was very useful during development to inspect the state of both the local SQL server and the SQL server in the Azure Cloud.

CRUD operations CRUD.png

Create: Add a new Model/Car/Make to database

Read: Read a new Model/Car/Make from database

Update: edit Model/Car/Make in database

Delete: delete entry from database

All operations other than Read are only available to admin after login

Authentication & AUthorization login.png

login page

loggedin-page.png

logged in page

update.png

admin edit privilege

Client and Server side data validation server-side-data-validation.png

used data annotations/attributes above properties for type checking

client-side-data-validation.png

If user does not enter the required fields, the text-danger will render in real time.

Deployment of SQL database and application to Azure

deploy.png

Website: https://brake.azurewebsites.net/

Releases

No releases published

Packages

No packages published

Languages