Answer to Question #159462 in Web Development for usman

Question #159462

Question No. 2 [10 Marks]

Create a New MVC Web application. Create a New Database in App_Data Folder WPLTASKDB. Create Four Table in your Database

Student -> StudentID (PK), Name, ClassID(FK), CampusID(FK)

Teacher -> TeacherID (PK), TeacherName, ClassID (FK), Qualification

Campus -> CampusID (PK), CampusName

Class -> ClassID(PK), ClassName

Create Four Controller in your Website, by using StudentController your Application should be able to Add, Update, Delete and View All Students, by using TeacherController your Application should be able to Add, Update, Delete and View All Teachers, by using CampusController your Application should be

able to Add, Update, Delete and View All Campus, by using ClassController your Application should be able to Add, Update, Delete and View All Classes.

The Home Page should contain all links of these Views.


Question No. 3 [10 Marks]

Please Copy your MVC Application Created in Question 2 and Paste it in anther Folder named Question 3.

1. Allow User to Register Themselves by using Asp.net Identity.

2. Allow Users to Login by using Asp.net Identity.

3. Create Two Roles 1. Teacher 2. Student in your application using asp.net identity.

4. Teacher Role should no be able to access Student Controller and Student Role Should not be able to access Teacher Controller.

5. Allow users to login via their facebook, twitter, linked in, gmail and Microsoft account.



1
Expert's answer
2021-01-29T03:42:28-0500

Visual Web Developer comes with a free SQL database called SQL Server Compact.

The database needed for this tutorial can be created with these simple steps:

  • Right-click the App_Data folder in the Solution Explorer window
  • Select Add, New Item
  • Select SQL Server Compact Local Database *
  • Name the database Movies.sdf.
  • Click the Add button

* If SQL Server Compact Local Database is not an option, you have not installed SQL Server Compact on your computer. Install it from this link: SQL Server Compact

Visual Web Developer automatically creates the database in the App_Data folder.

Note: In this tutorial it is expected that you have some knowledge about SQL databases. If you want to study this topic first, please visit our SQL Tutorial.

Double-clicking the Movies.sdf file in the App_Data folder will open a Database Explorer window.

To create a new table in the database, right-click the Tables folder, and select Create Table.

Create the following columns:



ColumnTypeAllow NullsIDint (primary key)NoTitlenvarchar(100)NoDirectornvarchar(100)NoDatedatetimeNo

Columns explained:

ID is an integer (whole number) used to identify each record in the table.

Title is a 100 character text column to store the name of the movie.

Director is a 100 character text column to store the director's name.

Date is a datetime column to store the release date of the movie.

After creating the columns described above, you must make the ID column the table's primary key (record identifier). To do this, click on the column name (ID) and select Primary Key. Also, in the Column Properties window, set the Identity property to True:


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS