SlideShare a Scribd company logo
www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis
Live Project - Web App
on Asp.Net MVC
- Mohd Manzoor Ahmed (MCTS, MCPD & MCT)
www.manzoorthetrainer.com
www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis
Project Plan
● Understanding Requirements and Database Design.
● Creating Solution and Adding projects to It.
● Creating The business Objects.
● Creating Data Access Layer in EF.
● Creating Business Logic Layer in C#.Net.
● Creating Presentation Logic Layer in MVC5.
● Designing Models, Controllers and Views.
● Business Rules Validations.
● Securing Your App.
● Implementing Transactions.
● Ajaxifying Your App.
● Conclusion And Feedback
www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis
Finalized Requirements
Link hub is a web portal where a user can submit their portal URL under a
specific category to be shared on link hub. Admin can approve or reject the
URL submitted by the user and in each case an email is sent out to the
user. Once the link is approve it will be available on the link hub portal
under a specific category.
www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis
Defining the Roles &
Responsibilities
Roles:
• User
o Can Browse URLs
o Can Register
o Can Submit A URL
• Admin
o Can CRUD Category
o Can View All Users
o Can ApproveOrReject URL
www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis
Identifying the Objects
• User
• Category
• Url
www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis
Creating The Relationships
• Category : Url
1--------------------> n
n--------------------> 1 (X)
n--------------------> n (X)
o (1:M)
www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis
Creating The Relationships
• User : Url
1--------------------> n
n--------------------> 1 (X)
n--------------------> n (X)
o (1:M)
www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis
Creating The Relationships
• Objects
o User
o Category
o Url
• Relationships
o Category : Url
 (1:M)
o User : Url
 (1:M)
www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis
3 Key Rules For Database
Design
1. One table for each object
2. For 1:M relationship. 1 will become master and M will become child i.e.,
primary key of 1 will act as a foreign key for M.
Eg:Department : Employees is 1 : M
Department Table
Did
DName
Description
Employee Table
Eid
EName
ESalary
Did
www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis
3 Key Rules For Database
Design
3. M:M relationship. Both the objects will become master and there will be
one more new table called as transaction table or child table with primary
keys of masters as foreign Keys in it.
Eg:Student : Course is M : M
Student Table
Sid
SName
SAddress
Course Table
Cid
CName
Description
Student_Course Table
SCId
Sid
Cid
www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis
Designing Database
tbl_Category
CategoryId
tbl_Url
UrlId
UId
CategoryId
tbl_User
UId
Role
www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis
Implementing Database
Lets go and Implement
www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis
Inserting Dummy Records
Lets go and Insert dummy and meaningful records
www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis
Design Project Arch.
DAL
Ado.Net
EF
Result c
BLL
C#.Net
c=a+b
UI
Asp.Net
MVC
a=10;
b=20;
show c
Database
MS SQL
Business Objects (BO)
www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis
Design Project Arch.
● UI
● BLL
● DAL
● BOL
www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis
Creating Solution and
Adding projects to It
Lets go and implement it
www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis
Creating The business
Objects
Basically a business object layer contains classes equivalent to the tables i.e.,
one class for each table.
Eg:If I have a department table
tbl_Department (Relation)
Did
DName
Description
Object
class tbl_Department
{
Public int Did {get;set;}
Public string DName {get;set;}
Public string Description {get;set;}
}
i.e., O/R M
Lets go and implement it
www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis
Creating The business
Objects - Relationship(1:M)
Object
class tbl_Deptartment
{
public int Did {get;set;}
public string DName {get;set;}
public string Description {get;set;}
public virtual List<tbl_Employee>
tbl_Employees {get;set;}
}
tbl_Department
Did
DName
Description
tbl_Employee
Eid
EName
ESalary
Did
Object
class tbl_Employee
{
public int Eid{get;set;}
public string EName {get;set;}
public double Esalary {get;set;}
public int Did{get;set;}
public virtual tbl_Department {get;set;}
}
www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis
Creating The business
Objects - Relationship(M:M)
tbl_Student
Sid
SName
SAddress
tbl_Course
Cid
CName
Description
tbl_Student_Course
SCId
Sid
Cid
www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis
Creating The business
Objects - Relationship(M:M)
Object
class tbl_Student
{
public int Sid{get;set;}
public string SName {get;set;}
public string Address {get;set;}
public virtual List<tbl_Student_Course>
tbl_Student_Courses {get;set;}
}
Object
class tbl_Course
{
public int Cid{get;set;}
public string CName {get;set;}
public string CDescription {get;set;}
public virtual List<tbl_Student_Course>
tbl_Student_Courses {get;set;}
}
Object
class tbl_Student_Course
{
public int SCid{get;set;}
public int Sid {get;set;}
public int Cid {get;set;}
public virtual tbl_Student {get;set;}
public virtual tbl_Course {get;set;}
}
www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis
Creating Of UI/PL
DAL
Ado.N
et
EF
Result
c
BLL
C#.Net
c=a+b
UI
Asp.Net
a=10;
b=20;
show c
Database
MS SQL
Business Objects (BO)
Database
MS SQL
Business Objects (BO)
UI
Asp.Net
MVC
a=10;
b=20;
show c
www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis
Roles & Responsibilities
Roles:
• User
o Can Browse URLs
o Can Register
o Can Submit A URL
• Admin
o Can CRUD Category
o Can View All Users
o Can ApproveOrReject URL
www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis
Home
www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis
Category
www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis
ListCategories
www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis
Register
www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis
SubmitURL
www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis
ApproveURLs
www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis
BrowseURLs
www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis
ListUsers
www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis
Login
www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis
UI - Modules
• User
o SubmitURL
• Admin
o Category
o ListCatergories
o ListUsers
o ApproveURLs
• Common
o Home
o BrowseURLs
• Security
o Login
o Register
www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis
SubmitURL
www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis
User Controllers Design
Controller Action
URL Index [Display Form - HttpGet]
Create [Submit Form - HttpPost]
www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis
Admin Controllers Design
Controller Action
Category Index[Display Form - HttpGet]
Create [Submit Form - HttpPost]
ListCategory Index [Display List - HttpGet]
ListUser Index [Display List - HttpGet]
ApproveURLs Index [Display List - HttpGet]
Approve [Submit Form- HttpPost]
www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis
Category
www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis
CategoriesList
www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis
List Users
www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis
Approve URLs
www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis
Common Controllers
Design
Controller Action
Home Index [Display Calender - HttpGet]
BrowseURLs Index [Display List Form - HttpGet]
www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis
Home
www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis
Browse Urls
www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis
Security Controllers Design
Controller Action
Login Index[Display Form- HttpGet]
SignIn[Submit Form - HttpPost]
Register Index[Display Form - HttpGet]
Create[Submit Form- HttpPost]
www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis
Login
www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis
Registration
www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis
Creating Data Access
Layer
Lets go and implement it
www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis
Creating Business Logic
Layer
Lets go and implement it
www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis
Creating Of UI/PL
DAL
Ado.Net
Result c
BLL
C#.Net
c=a+b
UI
Asp.Net
a=10;
b=20;
show c
Database
MS SQL
Business Objects (BO)
Database
MS SQL
Business Objects (BO)
UI
Asp.Net
a=10;
b=20;
show c
BLL
C#.Net
c=a+b
DAL
Ado.Net
Result c
www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis
Form Validations
Lets go and implement it
www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis
Business Rule Validations
Lets go and implement it
www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis
Authentication
Lets go and implement it
www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis
Authorization
Lets go and implement it
www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis
Applying Bootstrap Theme
Lets go and implement it
www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis
Advanced Operations
• Binding multiple models to a single View
• Implementing transactions
• Ajaxifying MVC App
• External Logins [Like Facebook Login]
www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis
Thanks


More Related Content

PPTX
Linked list
DOC
35787646 system-software-lab-manual
PPTX
Types of loops in c language
PPTX
Constructor overloading in C++
DOC
Sql queires
PDF
プロダクト開発してわかったDjangoの深〜いパーミッション管理の話 @ PyconJP2017
PPTX
Recursion
PPTX
Quick Sort
Linked list
35787646 system-software-lab-manual
Types of loops in c language
Constructor overloading in C++
Sql queires
プロダクト開発してわかったDjangoの深〜いパーミッション管理の話 @ PyconJP2017
Recursion
Quick Sort

What's hot (20)

PDF
New methods for exploiting ORM injections in Java applications
PPT
C Structures & Unions
PPT
Queue Data Structure
PPTX
[OOP - Lec 18] Static Data Member
PPTX
Pointer to function 1
PPTX
Principles of programming
PPTX
セキュリティの都市伝説を暴く
PDF
MS.Net Interview Questions - Simplified
PPTX
PL/SQL Fundamentals I
PPT
Encapsulation
PDF
GET and POST in PHP
PDF
C pdf
PDF
超簡単!SubversionとTortoiseSVN入門(操作編1)
PPTX
function, storage class and array and strings
DOCX
CSS gradients
PPTX
Degree of relationship set
PDF
Functor, Apply, Applicative And Monad
PPTX
TYPES OF ERRORS.pptx
PPTX
Functions in C - Programming
PDF
Kleisli Composition
New methods for exploiting ORM injections in Java applications
C Structures & Unions
Queue Data Structure
[OOP - Lec 18] Static Data Member
Pointer to function 1
Principles of programming
セキュリティの都市伝説を暴く
MS.Net Interview Questions - Simplified
PL/SQL Fundamentals I
Encapsulation
GET and POST in PHP
C pdf
超簡単!SubversionとTortoiseSVN入門(操作編1)
function, storage class and array and strings
CSS gradients
Degree of relationship set
Functor, Apply, Applicative And Monad
TYPES OF ERRORS.pptx
Functions in C - Programming
Kleisli Composition
Ad

Viewers also liked (20)

PPTX
Architecting ASP.NET MVC Applications
PDF
Asp net-mvc-3 tier
PPTX
ASP.NET MVC Performance
PPT
ASP.NET MVC Presentation
PPTX
Introduction to ASP.NET MVC
PPT
MVC ppt presentation
PDF
Top 100 SQL Interview Questions and Answers
PPTX
Client server 01
PPTX
Web Applications
PPTX
Excellent rest met de web api
PPTX
Treeview listview
PPS
05 gui 07
PPTX
Web API with ASP.NET MVC by Software development company in india
PPTX
Slide isra-dan-mikraj
PPTX
Server vs Client in real life and in programming world
DOC
Crystal repor
PPT
Active x
PPTX
Ch 7 data binding
PPTX
ASP.NET Web API
PPT
Crystal Reports - The Power and Possibilities of SQL Expressions
Architecting ASP.NET MVC Applications
Asp net-mvc-3 tier
ASP.NET MVC Performance
ASP.NET MVC Presentation
Introduction to ASP.NET MVC
MVC ppt presentation
Top 100 SQL Interview Questions and Answers
Client server 01
Web Applications
Excellent rest met de web api
Treeview listview
05 gui 07
Web API with ASP.NET MVC by Software development company in india
Slide isra-dan-mikraj
Server vs Client in real life and in programming world
Crystal repor
Active x
Ch 7 data binding
ASP.NET Web API
Crystal Reports - The Power and Possibilities of SQL Expressions
Ad

Similar to 3-TIER ARCHITECTURE IN ASP.NET MVC (20)

DOCX
LearningMVCWithLINQToSQL
PDF
Mvc4 crud operations.-kemuning senja
PDF
DocumentationJH
PPTX
Command Query Responsibility Segregation
PDF
深入淺出 MVC
DOCX
Tutorial mvc (pelajari ini jika ingin tahu mvc) keren
PDF
Free MVC project to learn for beginners.
DOCX
MVC Application using EntityFramework Code-First approach Part4
PDF
Hung_thesis
PDF
Web App Architectures and Design Patterns
DOCX
Learning MVC Part 3 Creating MVC Application with EntityFramework
DOCX
A report on mvc using the information
PDF
ASP.net Manual final.pdf
DOCX
asp.net - for merge.docx
DOCX
Amr Ismail Fahmy
PPTX
Think different cqrs
PDF
Mastering asp.net mvc - Dot Net Tricks
PDF
IRJET- MVC Framework: A Modern Web Application Development Approach and Working
DOC
Manish123 CV
PPTX
ASP.NET MVC 5 - EF 6 - VS2015
LearningMVCWithLINQToSQL
Mvc4 crud operations.-kemuning senja
DocumentationJH
Command Query Responsibility Segregation
深入淺出 MVC
Tutorial mvc (pelajari ini jika ingin tahu mvc) keren
Free MVC project to learn for beginners.
MVC Application using EntityFramework Code-First approach Part4
Hung_thesis
Web App Architectures and Design Patterns
Learning MVC Part 3 Creating MVC Application with EntityFramework
A report on mvc using the information
ASP.net Manual final.pdf
asp.net - for merge.docx
Amr Ismail Fahmy
Think different cqrs
Mastering asp.net mvc - Dot Net Tricks
IRJET- MVC Framework: A Modern Web Application Development Approach and Working
Manish123 CV
ASP.NET MVC 5 - EF 6 - VS2015

More from Mohd Manzoor Ahmed (7)

PPTX
Live Project On ASP.Net Core 2.0 MVC - Free Webinar
PPTX
Learn TypeScript from scratch
PPTX
Angularjs Live Project
PPTX
Learn JavaScript From Scratch
PPTX
Learn html and css from scratch
PPTX
Introduction to angular js for .net developers
PDF
C# simplified
Live Project On ASP.Net Core 2.0 MVC - Free Webinar
Learn TypeScript from scratch
Angularjs Live Project
Learn JavaScript From Scratch
Learn html and css from scratch
Introduction to angular js for .net developers
C# simplified

Recently uploaded (20)

PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
Spectroscopy.pptx food analysis technology
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
cuic standard and advanced reporting.pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Machine learning based COVID-19 study performance prediction
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Mobile App Security Testing_ A Comprehensive Guide.pdf
Spectroscopy.pptx food analysis technology
NewMind AI Weekly Chronicles - August'25 Week I
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Encapsulation_ Review paper, used for researhc scholars
Understanding_Digital_Forensics_Presentation.pptx
MIND Revenue Release Quarter 2 2025 Press Release
cuic standard and advanced reporting.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Spectral efficient network and resource selection model in 5G networks
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Unlocking AI with Model Context Protocol (MCP)
Machine learning based COVID-19 study performance prediction
Programs and apps: productivity, graphics, security and other tools
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
sap open course for s4hana steps from ECC to s4
Building Integrated photovoltaic BIPV_UPV.pdf
Review of recent advances in non-invasive hemoglobin estimation
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf

3-TIER ARCHITECTURE IN ASP.NET MVC

  • 1. www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis Live Project - Web App on Asp.Net MVC - Mohd Manzoor Ahmed (MCTS, MCPD & MCT) www.manzoorthetrainer.com
  • 2. www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis Project Plan ● Understanding Requirements and Database Design. ● Creating Solution and Adding projects to It. ● Creating The business Objects. ● Creating Data Access Layer in EF. ● Creating Business Logic Layer in C#.Net. ● Creating Presentation Logic Layer in MVC5. ● Designing Models, Controllers and Views. ● Business Rules Validations. ● Securing Your App. ● Implementing Transactions. ● Ajaxifying Your App. ● Conclusion And Feedback
  • 3. www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis Finalized Requirements Link hub is a web portal where a user can submit their portal URL under a specific category to be shared on link hub. Admin can approve or reject the URL submitted by the user and in each case an email is sent out to the user. Once the link is approve it will be available on the link hub portal under a specific category.
  • 4. www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis Defining the Roles & Responsibilities Roles: • User o Can Browse URLs o Can Register o Can Submit A URL • Admin o Can CRUD Category o Can View All Users o Can ApproveOrReject URL
  • 5. www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis Identifying the Objects • User • Category • Url
  • 6. www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis Creating The Relationships • Category : Url 1--------------------> n n--------------------> 1 (X) n--------------------> n (X) o (1:M)
  • 7. www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis Creating The Relationships • User : Url 1--------------------> n n--------------------> 1 (X) n--------------------> n (X) o (1:M)
  • 8. www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis Creating The Relationships • Objects o User o Category o Url • Relationships o Category : Url  (1:M) o User : Url  (1:M)
  • 9. www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis 3 Key Rules For Database Design 1. One table for each object 2. For 1:M relationship. 1 will become master and M will become child i.e., primary key of 1 will act as a foreign key for M. Eg:Department : Employees is 1 : M Department Table Did DName Description Employee Table Eid EName ESalary Did
  • 10. www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis 3 Key Rules For Database Design 3. M:M relationship. Both the objects will become master and there will be one more new table called as transaction table or child table with primary keys of masters as foreign Keys in it. Eg:Student : Course is M : M Student Table Sid SName SAddress Course Table Cid CName Description Student_Course Table SCId Sid Cid
  • 11. www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis Designing Database tbl_Category CategoryId tbl_Url UrlId UId CategoryId tbl_User UId Role
  • 12. www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis Implementing Database Lets go and Implement
  • 13. www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis Inserting Dummy Records Lets go and Insert dummy and meaningful records
  • 14. www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis Design Project Arch. DAL Ado.Net EF Result c BLL C#.Net c=a+b UI Asp.Net MVC a=10; b=20; show c Database MS SQL Business Objects (BO)
  • 15. www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis Design Project Arch. ● UI ● BLL ● DAL ● BOL
  • 16. www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis Creating Solution and Adding projects to It Lets go and implement it
  • 17. www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis Creating The business Objects Basically a business object layer contains classes equivalent to the tables i.e., one class for each table. Eg:If I have a department table tbl_Department (Relation) Did DName Description Object class tbl_Department { Public int Did {get;set;} Public string DName {get;set;} Public string Description {get;set;} } i.e., O/R M Lets go and implement it
  • 18. www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis Creating The business Objects - Relationship(1:M) Object class tbl_Deptartment { public int Did {get;set;} public string DName {get;set;} public string Description {get;set;} public virtual List<tbl_Employee> tbl_Employees {get;set;} } tbl_Department Did DName Description tbl_Employee Eid EName ESalary Did Object class tbl_Employee { public int Eid{get;set;} public string EName {get;set;} public double Esalary {get;set;} public int Did{get;set;} public virtual tbl_Department {get;set;} }
  • 19. www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis Creating The business Objects - Relationship(M:M) tbl_Student Sid SName SAddress tbl_Course Cid CName Description tbl_Student_Course SCId Sid Cid
  • 20. www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis Creating The business Objects - Relationship(M:M) Object class tbl_Student { public int Sid{get;set;} public string SName {get;set;} public string Address {get;set;} public virtual List<tbl_Student_Course> tbl_Student_Courses {get;set;} } Object class tbl_Course { public int Cid{get;set;} public string CName {get;set;} public string CDescription {get;set;} public virtual List<tbl_Student_Course> tbl_Student_Courses {get;set;} } Object class tbl_Student_Course { public int SCid{get;set;} public int Sid {get;set;} public int Cid {get;set;} public virtual tbl_Student {get;set;} public virtual tbl_Course {get;set;} }
  • 21. www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis Creating Of UI/PL DAL Ado.N et EF Result c BLL C#.Net c=a+b UI Asp.Net a=10; b=20; show c Database MS SQL Business Objects (BO) Database MS SQL Business Objects (BO) UI Asp.Net MVC a=10; b=20; show c
  • 22. www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis Roles & Responsibilities Roles: • User o Can Browse URLs o Can Register o Can Submit A URL • Admin o Can CRUD Category o Can View All Users o Can ApproveOrReject URL
  • 23. www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis Home
  • 24. www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis Category
  • 25. www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis ListCategories
  • 26. www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis Register
  • 27. www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis SubmitURL
  • 28. www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis ApproveURLs
  • 29. www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis BrowseURLs
  • 30. www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis ListUsers
  • 31. www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis Login
  • 32. www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis UI - Modules • User o SubmitURL • Admin o Category o ListCatergories o ListUsers o ApproveURLs • Common o Home o BrowseURLs • Security o Login o Register
  • 33. www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis SubmitURL
  • 34. www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis User Controllers Design Controller Action URL Index [Display Form - HttpGet] Create [Submit Form - HttpPost]
  • 35. www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis Admin Controllers Design Controller Action Category Index[Display Form - HttpGet] Create [Submit Form - HttpPost] ListCategory Index [Display List - HttpGet] ListUser Index [Display List - HttpGet] ApproveURLs Index [Display List - HttpGet] Approve [Submit Form- HttpPost]
  • 36. www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis Category
  • 37. www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis CategoriesList
  • 38. www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis List Users
  • 39. www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis Approve URLs
  • 40. www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis Common Controllers Design Controller Action Home Index [Display Calender - HttpGet] BrowseURLs Index [Display List Form - HttpGet]
  • 41. www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis Home
  • 42. www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis Browse Urls
  • 43. www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis Security Controllers Design Controller Action Login Index[Display Form- HttpGet] SignIn[Submit Form - HttpPost] Register Index[Display Form - HttpGet] Create[Submit Form- HttpPost]
  • 44. www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis Login
  • 45. www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis Registration
  • 46. www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis Creating Data Access Layer Lets go and implement it
  • 47. www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis Creating Business Logic Layer Lets go and implement it
  • 48. www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis Creating Of UI/PL DAL Ado.Net Result c BLL C#.Net c=a+b UI Asp.Net a=10; b=20; show c Database MS SQL Business Objects (BO) Database MS SQL Business Objects (BO) UI Asp.Net a=10; b=20; show c BLL C#.Net c=a+b DAL Ado.Net Result c
  • 49. www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis Form Validations Lets go and implement it
  • 50. www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis Business Rule Validations Lets go and implement it
  • 51. www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis Authentication Lets go and implement it
  • 52. www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis Authorization Lets go and implement it
  • 53. www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis Applying Bootstrap Theme Lets go and implement it
  • 54. www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis Advanced Operations • Binding multiple models to a single View • Implementing transactions • Ajaxifying MVC App • External Logins [Like Facebook Login]
  • 55. www.ManzoorTheTrainer.com | Enroll here [MVC 3-Tier (50% Off)] :http://goo.gl/iMulis Thanks 