this is my project

Description


Unformatted Attachment Preview

Don't use plagiarized sources. Get Your Custom Assignment on
this is my project
From as Little as $13/Page

Conestoga College – ACS & IT
Programming Microsoft Web Technologies – PROG2230
Introduction
This final is a hands-on exam. You are given some starting code (found in the Final folder in
eConestoga) and you must follow the steps outlined in this document to complete the code for
final submission. The instructions here are sometimes complemented by comments in the
starting code. Good luck, and feel free to submit multiple versions but, as always, only your last
(i.e. most recent) solution will be graded.
Some advice
It is always best to make small changes and test it – i.e. work in small edit-run-test cycles. The
starting code is a runnable app so do everything you can to keep the app runnable as you
progress through the steps below. It is far better to have something runnable at the end that
might not be complete than something you thought was complete but doesn’t run! Other than
that, the best advice is to slow down and read carefully – the steps below outline everything you
need to do to complete this exam.
What/how to submit?
Zip up your entire solution into one zip file and submit that file. You can submit multiple
solutions but only the latest (i.e. most recent) one will be looked at and evaluated.
How will it be graded?
Accompanying the exam will be an rubric that details how your grade will be calculated so you
will want to make sure that you are doing everything as it’s laid out there. The Professor’s
expectations when marking your solution are that they can:
● Download and extract your latest solution as a single zip file
● Open the solution in VS 2022
● Open the package manager console (PMC) and run “Update-Database”
● And run the solution and it should open your web app without errors in the browser
What does the start-up project give you?
For this exam there is a lot of code in the starting-code zip file. Not only does it set up some nice
infrastructure for you to help get you started on this exam but it also already implements a great
deal of functionality. More specifically, with the starting code you get the following:
● It includes a connection string in the appsettings.json file – BUT you must alter it so that
the Database name includes your student number, namely:







It has 3 projects:
○ A class library with the entities for the app
○ An xUnit project intended to be used to test the entities class library with a project
reference to the entities library project
○ An ASP.NET Core MVC Web App that also already has a project reference to
the entities library project
The web app project already includes a reference to the NuGet package for EF Core &
EF Core Identity
jQuery UI is in place so that the date picker component gets used for the user to input
dates
Full support for registering and logging in users
There is some seeded data already, including a user called “admin” that is in the “Admin”
role
The web app can be run and implements the following basic functionality:
○ A home page that loads with 1 view component in use and a placeholder for
another
○ View Project entities in an HTML table
○ Each row in this table has the following Action links:
■ Edit: which takes the user to functioning page to edit a Project entity
■ Delete: which takes the user to functioning page to delete a Project entity
■ Manage: which takes the user to a Details page that basically consists of
only placeholders because you will be implementing that page
As mentioned, it is a runnable app and has some functionality so, after an update
database, you should be able to run and use it.
What you need to do
The final is based on an app that is very similar in structure to the database-driven web apps
that have been covered in the course, especially in terms of what you encountered in the
assignments and in-class assignments. It allows users to view, add, edit, and delete Project
entities and then manage some related child entities on a Details page.
The screenshots below will be very helpful but to complete this exam you need to complete the
following high-level steps:
Part 0 – Setup:
1. Download and unzip the “final-starting-code.zip” file included in the Final folder, and
then open the VS solution in it to use as your starting point.
2. In the “Home/Index” view change “Bart Simpson (Student #: 123456)” to your full name
and student number in brackets.
3. If you want to run the app as is then run update-database.
Part 1 – Validation:
Add validation for adding/editing Employee entities:
4. The fields: EmployeeNumber, FirstName, and LastName are all required
5. Values of the EmployeeNumber property must also adhere to a specified format of: 3
letters (but case doesn’t matter), a dash, and 6 digits, i.e. “ABC-123456”
6. In addition to these value-based validation requirements, when there are validation
errors, ensure that a message appears that indicates the errors in the form.
Part 2 – xUnit:
7. Implement a simple unit test as described in the comments for the one and only unit test
setup for the project and then ensure that the test runs and passes.
Part 3 – Tag helpers, Partial Views, and View Components:
8. The solution contains a complete solution for a “Last Action Message” TagHelper – all
that you need to do for this step is to make use of it in the layout, being sure of course to
make sure you do any required referencing to make it work
9. The existing Edit and Add views for the Project entity contain some common form
elements – move those common elements to a partial view and then simply make use of
the partial view in those 2 forms
10. The solution contains an existing View Component, namely the Recently Completed
Tasks component and it is used in the “Home/Index” page. Your task here is to
implement a second “In-progress tasks due soon” View Component. It should:
a. Take a parameter representing the number of tasks to display
b. And then display (at most) that many future in-progress tasks and order them
with the most recent at the top
c. Then make use of the new view component in the “Home/Index” page as well, in
the specified placeholder
Part 4 – Authentication & Authorization:
Complete the authentication and authorization infrastructure that is already in place by taking
the following steps:
11. Configure the following password criteria:
a. Passwords must be at least 6 characters.
b. Passwords must have at least 1 digit.
c. Passwords must have at least one special – i.e. non-alphanumeric character.
12. Restrict the actions of adding and editing of Project entities to authenticated users.
a. Note, to test this properly you will have to register a user.
b. Also, to clarify what this means, if an anonymous user tries to add, edit, or delete
a Project entity, then they should be redirected to a login page, as shown in the
screenshot below.
13. Further restrict the action of deleting Project entities to authenticated users in the Admin
role.
a. That is, if even an authenticated user not in the Admin role tries to delete, then
they are redirected to an access denied page, as shown below.
Part 5 – EF Core, LINQ, and the Details page:
In this part you will implement the Details page that will allow the user to see more details about
a specific Project entity and view and add both its related Employee and ProjectTask entities.
To do this, please first see the screenshots below for the Details page, and then complete the
following steps:
14. Add a view model that encapsulates the information required for this Details page view:
a. The active Project entity
b. A potential New Employee object
c. A potential New ProjectTask object
d. The relevant counts (see screenshot below)
15. Complete the GetProjectById action method in order to have it return the required
information back to the details view
16. Complete the Details view by replacing the various placeholders with the relevant
functionality, namely:
a. An HTML form to view the current Project entity’s related Employee entities
b. And to the right of that table a form to add a new Employee entity
c. An then below that, another HTML form to view the current Project entity’s
related ProjectTask entities
d. And to the right of that 2nd table a form to add a new ProjectTask entity
17. Add new action methods to the Project controller to handle the requests to:
a. Add new Employee entity related to the current Project entity
b. Add new ProjectTask entity related to the current Project entity
c. And be sure that these action methods:
i.
Return back to the Details view
ii.
And result in the display of a last action message if successful
How it should look in the end
Putting all this together, the following represent some screenshots of a completed version,
starting with the home page:
The all Project entities view:
The Details view for a given Project entity:
The Details view after an attempt to add an invalid Employee entity:
The Details view after a successful attempt to add an Employee entity:
An attempt to add a new (and editing an existing would be similar) Project entity:
An attempt to delete a Project entity:

Purchase answer to see full
attachment