Week10Tutorial_UserRolesEntityFramework.docx - University of Canberra Faculty of Science and Technology Web Design and Programming(7175 6691 Week 10

Week10Tutorial_UserRolesEntityFramework.docx - University...

This preview shows page 1 - 3 out of 10 pages.

University of Canberra Faculty of Science and Technology Web Design and Programming (7175 & 6691) Week 10 Tutorial MVC, Database, User, Roles and Entity Framework Task To use MVC, Database and Entity Framework to build a website To customise this website with user’s roles. Create an ASP.NET Core Web Application project Open Visual Studio 2017 or 2019, select Create a New Project (if you use VS2019) then click Next , or select New > Project (VS2017). On the New Project dialog, select Visual C# > Web > ASP.NET Core Web Application . Enter AspNetUserRolesEntityFramework to the Name text box then browse to a folder in your local drive (C:\ or a folder in your USB drive, do not use your university H: drive) On the new dialog, select Web Application (Model-View-Controller) . Change Authentication to Individual User Accounts , then click Create (VS2019) or OK (VS2017). Double-click on Properties in Solution Explorer . Select Debug on the new window, find the checkbox for Enable SSL then uncheck it (UC does not allow us to run https) Save all then run the project to display the website on web browser. User and Roles Click Register to register a new user on this website. Enter [email protected] to username and Wdp-2019 to password text boxes. Click OK. The following will appear on your web site Click Apply Migrations button and wait for a while. You will see Try refreshing the page appearing next to the button. Refresh your web browser. You will see the username appearing on the top right corner. Log off then register one more user (username: [email protected] , password: Wdp-2019). Log off then close the web browser. Page 1 of 10
Image of page 1
In the next steps, you will assign Manager role to [email protected] user and RegisteredUser role to [email protected] user. On Visual Studio menu bar, click on View then select SQL Server Object Explorer . You will see it on the left side. Click on it to open the explorer. Expand SQL Server then local database and find a database containing your web project name and expand it as seen below.
Image of page 2
Image of page 3

You've reached the end of your free preview.

Want to read all 10 pages?

  • Three '17

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes
A+ icon
Ask Expert Tutors