Building a MVC 5 Membership Website

In this course you will learn how to build an MVC 5 website using C#, Entity Framework, HTML5, CSS, JavaScript and Ajax.
3.8 (20 ratings) Instead of using a simple lifetime average, Udemy calculates a
course's star rating by considering a number of different factors
such as the number of ratings, the age of ratings, and the
likelihood of fraudulent ratings.
179 students enrolled
$19
$50
62% off
Take This Course
  • Lectures 238
  • Length 25.5 hours
  • Skill Level Intermediate Level
  • Languages English
  • Includes Lifetime access
    30 day money back guarantee!
    Available on iOS and Android
    Certificate of Completion
Wishlisted Wishlist

How taking a course works

Discover

Find online courses made by experts from around the world.

Learn

Take your courses with you and learn anywhere, anytime.

Master

Learn and practice real-world skills and achieve your goals.

About This Course

Published 6/2016 English

Course Description

Welcome,

This highly modular and proven no-fluff course will teach you how to implement a fully functional ASP.NET MVC 5 membership website complete with an Entity Framework code-first database and two user interfaces; one for administrators and one for the end-user. I have used the teaching technique used in this video course for many years with fast superb results for my students.

Gone are the days when you learned programming through short incoherent examples, in this course you will learn by implementing a complete web application while "looking over my shoulder" as I implement it with you in short step-by-step scenarios. This course is laser-focused and highly targeted to web developers just starting out who have a completed at least one beginner MVC 5 course prior to this course; the prerequisites for this course are that you have a basic understanding of MVC 5 and the C# language, other than that I only ask that you keep an open mind and are ready to learn.

Complete this course and be proud of your achievement. Host the web application online and showcase it in your CV on job interviews or wen negotiating your salary with your boss. You can even use your knowledge to work online selling your services on sites such as Fiverr and UpWork.


Technologies, frameworks and languages:

  • C# (you need to be proficient)
  • MVC 5 (create/modify models, views and controllers)
  • Razor syntax
  • HTML5/CSS3 (you need basic knowledge - I have included a basic PDF course for you to get started or to use as a refresher)
  • Bootstrap (used for styling and create a responsive design)
  • JavaScript/JQuery (you need basic knowledge)
  • Ajax (used for asynchronous server calls)
  • LINQ (to query the database)
  • Extension methods (to clean up your C# code and enable re-use)
  • HTML Helper methods (to clean up your HTML and enable re-use)
  • Use settings from the web.config file
  • Deploy to Azure (BONUS)


Three BONUS courses that will get off to a flying start:

  • HTML5/CSS3/Bootstrap [PDF] - Will teach you basic HTML5, CSS3 and Bootstrap.
  • MVC 5 For Beginners [PDF] - Will teach you the beginner stuff needed for this course.
  • Azure [VIDEO] - How to setup and deploy your web application to the Azure cloud.


FREQUENTLY ASKED QUESTIONS

1. Do this course cover ASP.NET Core 1.0?

No! ASP.NET Core 1.0 is still an immature framework and it's going to take quite some time until it gets adopted for production use. Many of the skills you learn in this course can be used when building to ASP.NET Core 1.0 applications in the future. Beware, however, that the folder structure in ASP.NET Core 1.0 has changed significantly and corresponds directly with the folder structure on the hard drive.

2. Why should I pay for this course when there are lots of free tutorials available?

Free tutorials and YouTube videos are free for a reason. They introduce you to a few concepts here and there, but soon you'll find yourself jumping from one tutorial to another without getting the full picture; this will cause you to waste valuable time that you could spend with your family and friends or to make money. By taking a highly structured course, such as this one, you will learn the necessary skills in a real world scenario step-by-step.


I hope you love the course!

Sincerely,
Jonas Fagerberg

What are the requirements?

  • Have a basic understanding of MVC 5.
  • have a basic understanding of HTML5 and CSS3.
  • Be proficient in C#.

What am I going to get from this course?

  • Create a "real world" code-first database using Entity Framework.
  • Add and modofy models, views and controllers to perform CRUD operations agains the database.
  • Use client-side and server-side validation.
  • Secure the controllers, actions and view content with authorization and roles.
  • Implement security with ASP.NET Identity (authentication, authorization and roles).
  • Use JavaScript, JQuery and Ajax to build a great end-user interface with asynchronous server calls.
  • Style the user interfaces using CSS3 and Bootstrap.
  • Create a responsive website.
  • Implement product subscription scenarios with registration codes.
  • Create an alternate way to login to the application.
  • Implement password reset functionality.
  • Register users with the site.
  • Manage users and their subscriptions.

What is the target audience?

  • Web developers just starting out who have a completed at least one beginner MVC 5 course prior to this course.

What you get with this course?

Not for you? No problem.
30 day money back guarantee.

Forever yours.
Lifetime access.

Learn on the go.
Desktop, iOS and Android.

Get rewarded.
Certificate of completion.

Curriculum

Section 1: Welcome
05:32

The first video in this section itroduces the website you will be building in this course and the second video show you how to setup the project in Visual Studio 2015.

11:05

This video will show you how to setup the Memeberships Visual Studio 2015 solution and how to add necessary folders and files.

The video also shows how to connect an already existing TFS source control folder to the Memberships solution. Disregard the parts about TFS if you are not using TFS source control.

Section 2: Module 1 - Adding the Admin menu to the navigation bar
00:51

This is an intrduction to what you will be creating in this module.

01:08

Adding the Admin area where the Admin Controllers, Actions and Views will be created.

01:17

This iintroductory video will describe what the menu look like that you will be creating in this section.

07:26

This is the second of four videos showing how to add the Admin menu. Adding the drop-down menu using a partial view.

01:08

This is the second of four videos showing how to add the Admin menu. Removing links from the navigation bar in the Admin area.

08:05

This is the third of four videos showing how to add the Admin menu. Hooking up the Hover event method using JavaScript/JQuery to open the Admin menu when the user hovers over the Admin navigation link.

04:38

This is the fourth of four videos showing how to add the Admin menu. Adding Menu items to the Admin menu.

Section 3: Module 2 - Creating the Database
12:00

This introduction video gives an overview of what you will be creating in this section.

With the help of the remaining videos in this section you will create the necessary entity model classes which will become the tables in the database that you will create with Entity Framework Code-First. You will apply certain attribute to the properties representing the table columns to restrict them and to force certain settings in the database.

07:24

Learn how to enable database migrations, configure settings and create the database.

13:52

Adding the Section table to the database and look at its settings in the Server Explorer window.

09:01

Adding the Part table to the database and look at its settings in the Server Explorer window.

04:21

Adding the ItemType table to the database.

19:06

In this video you will add the Item table to the database. This table has the most columns of all the tables in the database. It is one of the core tables which will contain items, or pieces of content, associated with one or more products.

07:33

Adding the Product table to the database. This is one of the core tables which jolds information about products that can be associated with one or more subscriptions.

05:04

Adding the ProductType table to the database. The product type defines what type of product it is, i.e. a book, a video, a course, ...

03:14

Adding the ProductLinkText table to the database. This table contain enticing link texts which are meant to get the user to click into a product and view it's content. The text is displayed in the green animated link on the product image.

05:18

Adding the Subscription table to the database. This is one of trhe core tables which holds inforamtion about individual subscriptions that the user can subscribe to by entering a registration code. A sunscription can contain one or many products.

07:33

Adding the ProductItem table to the database. This is a connection table between the Product and the Item tables accociating one or more items with one or more products.

03:36

Adding the SubscriptionProduct table to the database.This is a connection table between the Product and the Subscription tables accociating one or more products with one or more subscriptions.

05:39

Adding the UserSubscription table to the database. This is a connection table between the Subscription and the AspNetUsers tables accociating one or more subscriptions with one or more users.

04:15

Modifying the AspNetUser table through the ApplicationUser class. Three additional columns will be added to this auto-generated table making it possible to store additional data such as the first name of the registered user.

Section 4: Module 3-1 - Creating the Admin User Interface for the Section entity
03:40

This is an introduction to the Controllers, Actions and Views needed for the minor entities asscociated wth the Section, Part, ItemType, ProductType and ProductLinkText tables.

19:57

Scaffold the controllers, actions and views for the Section table.

08:41

Modify the Create view for the Section table.

08:44

Create a partial view containing a "Back to List" button which will navigate back to the Index view of the current controller.

05:17

Modify the Edit View creating buttons instead of links and use Bootstrap to style the view.

12:59

Modify the Details View creating buttons instead of links and use Bootstrap to style the view. We will also create a partial view called _EditButtonPartial which will navigate to the Edit view of the current controller.

05:10

Modify the Delete View and replace the Back To List link with the _BackToListButtonPartial view.

07:04

Modify the Index View and add a new partial view called _CreateButtonPartial which will navigate to the Create view associated with the current controller.

18:05

Add a class called SmallButtonModel which will be used when creating a partial view containing the table buttons.

06:01

Add a a partial view called _SmallButtonPartial which will be used for each button in the partial view containing the table buttons.

18:16

Add a partial view called _TableButtonPartial using the _SmallButtonPartial view for its intrinsic buttons.

Section 5: Module 3-2 - Adding controllers for the rest of the Minor tables
07:17

Adding Controller, Actions and Views for the Part table.

03:49

Adding Controller, Actions and Views for the ItemType table.

03:42
Adding Controller, Actions and Views for the ProductType table.
03:45

Adding Controller, Actions and Views for the ProductLinkText table.

Section 6: Part 4-1 - Creating the Admin User Interface for the Item entitiy
00:47

A brief description of what we will be implementing in this and the next module for the Item, Product and Subscription tables.

03:56

In this module you will scaffold and modify the controllers, actions and views for the Item table.

01:55

Add an extension method called GetPropertyValue which will be used when fetching Items.

06:37

Add an extension method called GetPropertyValue which will be used when fetching Items.

01:36

Add an extension method called ToSelectListItem which will be used when displaying items in drop-down controls.

07:31
Add an extension method called ToSelectListItem which will be used when displaying items in drop-down controls.
12:41

Add the Create view for the Item controller and replace some of the textboxes with drop-downs.

04:08

Alter the Create view for the Item controller by changing a property data type in the Item entity class, updating the database and changing the textbox to a checkbox.

04:07

Styling the links to Bootstrap buttons in the Create view.

03:53

Add items to the Item table to have some data to work with.

02:47

Changing the textbox for HTML content into a text area to allow for multiple rows.

10:21

Create a model object for the drop-downs in the controller for the Edit view and style the it with Bootstrap.

01:34

Styling the Details view with Bootstrap and partial views.

02:45

Styling the Delete view with Bootstrap and partial views.

07:20

Styling the table in the Index view with Bootstrap and replacing the links with buttons created with a partial view.

Section 7: Part 4-2 - Creating the Admin User Interface for Product and Subscription
Introduction to the Product and Subscription controllers, actions and views
Preview
01:08
01:59

Add data to the minor entities associated with the Product table to have some data to work with when adding products later.

09:01

Add the ProductModel class which is used to transport data from the Product controller to its views.

12:01

Add the asynchronous Convert extension method that will convert a collection

of Product objects into a collection of ProductModel objects.

Adding the Product Controller, Actions and Views
02:05
Altering the Product Index View (1/2)
10:07
Altering the Product Index View (2/2)
01:15
Altering the Product Create view
12:17
Altering the Product Edit view
07:14
12:06

Add a new Convert extension method which converts a single Product into a ProductModel instance and use it to create the model for the Details view.

05:36

Use the Convert extension method added in the previous video to create a model for the Delete view. Also delete a product to see that the view is working.

Adding the Subscription Controller, Actions and Views
15:09
Section 8: Part 4-3 - Creating the Admin User Interface for the ProductItem entity
00:34

Connector entities are tables which are used to create a many-to-many relationship in the database.

02:41

In this module you will scaffold and modify the controllers, actions and views for the ProductItem table.

04:48

Add the ProductItemModel class which transports data from the controller to its views.

07:04

Styling the view with Bootstrap and changing textboxes to drop-downs.

04:12

Adding a model to the action methods and make them asynchronous. The model is rendered with the view.

07:14

Add an overload for the Convert extension method to handle object conversions from a list of ProductItem objects to a list of ProductItemModel objects.

Altering the ProductItem Index view
07:52
04:43

Saving the ProductId and ItemId sent to the view when it was rendered in hidden fields called OldProductId and OldItemId; these ids will then be used to remove the old item when the drop-down selections has changed and the user clicks the Edit submit button. A transaction will be used when removing the old values and storing the new values to make sure that both changes will be propagated to the database.

05:13

Add an overload for the Convert extension method to handle object conversions from a ProductItem object to a ProductItemModel object.

11:26

Create a method called GetProductItem which fetches ProductItem from the database based on a product id and a item id. This method will then replace the default call to the FindAsync method in the HttpGet Edit Action.

00:55

This is an introductory video to the GetChange method which checks if a ProductId-ItemId combination can be changed in the ProductItem table.

07:41

Implement the GetChange method which checks if a ProductId-ItemId combination can be changed in the ProductItem table.

15:22

Explains how to implement the Change method which alters a ProductId-ItemId combination in the ProductItem table.

11:09

Add calls to the CanChange and Change methods to persist the changes to the database for the ProductItem instance.

05:39

Send in two parameters instead of the default one and call the GetProductItem method we created in a previous video.

Overloading the Convert Extension Method
07:05
Altering the ProductItem's Details view (1/2)
09:14
06:58

Add the EditButtonModel class which is used to send ids to the _EditButtonPartial view.

07:18

Altering the _EditButtonDetailsPartial view to use the EditButtonModel class as its view; the partial view is then rendered from the Details view.

10:21

Change the view to use the ProductItemModel class as its view model. Use the _EditButtonetailPartial view and the EditButtonModel class to replace the Edit link with an Edit button in the view. Alter the Delete action to take two parameters and call the GetProductItem method instead of the FindAsync method to fetch the desired Productitem to remove from the database. Style the other links to buttons with Bootstrap classes.

Section 9: Part 4-4 - Creating the Admin User Interface for the SubscriptionProduct entity
Creating the SubscriptionProduct's Controller
02:43
Adding the SubscriptionProductModel class
02:45
Altering the Extension Methods
18:09
Adding the GetSubscriptionProduct method
04:10
Altering the Controller Actions
16:25
Altering the views 01
02:42

Students Who Viewed This Course Also Viewed

  • Loading
  • Loading
  • Loading

Instructor Biography

Jonas Fagerberg, Professional Teacher, Developer and Consultant

Jonas started a company back in 1994 focusing on education in Micro­soft Office and the Microsoft operating systems. While studying at the university in 1995, he wrote his first book about Widows 95 as well as a number of course materials.

In the year 2000, after working as a Microsoft Office developer consult­ant for a couple of years, he wrote his second book about Visual Basic 6.0.

Between 2000 and 2004 he worked as a Microsoft instructor with two of the largest educational companies in Sweden. First teaching Visual Basic 6.0, and when Visual Basic.NET and C# were released he started teaching these languages as well as the .NET Framework. Teaching classes on all levels for beginner to advanced developers.

From the year 2005, Jonas shifted his career towards consulting once again, working hands on with the languages and framework he taught.

Fore the past two years he has been teaching C#, SQL Server Programming, Entity Framework and MVC 5 to students at a vocational college.

Jonas wrote his third book C# programming aimed at beginners to intermediate developers in 2013 and in 2015 his fourth book C# for beginners - The Tactical Guide was published. Jonas has also produced a 24h+ video course called. In July 2016 his latest book ASP.NET MVC 5 - How to build a membership website will be released on Amazon which this video course is based on.

Ready to start learning?
Take This Course