COIT12204 Web Site Design

Assignment 2 Guide – Part 1

Getting started
  • Download the assignment 2 resources files
  • Copy and replace the updated styles.css
  • You may find some in some situations images and the css does not display. To fix this add a slash at the start of the path for images and also for the css files

i.e. for the Layout.cshtml

    <link rel=”icon” href=”/img/Fevicon.png” type=”image/png”>

    <link rel=”stylesheet” href=”/lib/twitter-bootstrap/css/bootstrap.min.css”>

    <link rel=”stylesheet” href=”/lib/font-awesome/css/font-awesome.min.css”>

    <link rel=”stylesheet” href=”/css/style.css”>

Database
  • In the product model uncomment the tag for price as we need to set the db column type
    • Right click on the error and import the annotation library
Install Database Packages
  • Add the database packages and tools by following Listing 7.12 to 7.13 in Chapter 7 of the text (see note below if there are problems)
  • Note that you MUST change into the project folder (the one with the yourprojectname.csproj)
    • You cannot run this from the solution folder

Note: If you DO NOT have the 3.1 SDK installed it may complain in Listing 7.12, depending what SDK you specified

  • If this occurs try the following steps
  • Use dotnet –list-sdks or dotnet –info to check your version
  • Then open global.json in the root folder and check the version
  • Change global.json from 3.1.x to your later version

“sdk”: {

  “version”: “5.0.302”  (use your SDK version here)

}

  • Note: if you changed the version you MUST run the app to update the project SDK before the next step
  • Now you can do Listing 7.12 and Listing 7.13
Migration
  • Make sure you hit Save All before running the migrate command
    • If the model is not saved it will not see it to build the migration file
    • If you have a problem open that the migration file and check that the create database and create table commands are there
  • If there is a problem with the migrate, just delete the migrations folder and rerun the migrate command again
  • Note that the database itself is not actually created until later
Database Connection
  • In Listing 7.14 you need to change the database name and the connection name to suit your project name

“ConnectionStrings”: {

    “YourConnectionName“: “Server=(localdb)\\MSSQLLocalDB;Database= YourDbName

DbContext and Repository
  • Do Listing 7.15 to 7.20
  • Note: You will need to change the namespaces to suit your project in most files that you create from the code in the textbook
  • In startup.cs use your connection name
Seed Data
  • In Listing 7.21 move the seed data from the Catalogue controller sample data method into SeedData.cs
  • Note the different format for the Products.AddRange() command
  • Add the seed data call to startup.cs as in Listing 7.22 (this will migrate the database)
  • Delete the old sample data method in the Catalogue controller
Test

Run the project and check that the database has been created

  • View => SQL Server Object Explorer => SQL Server => (localdb)MSSQLLocalDB … => Databases
  • You can also delete the database from here if required (right click on the database)
    • Check Close existing connection when it asks
    • Then rerun the app to recreate (migrate) the database (in SeedData.cs)
Catalogue
  • Adapt the code from Listing 7.23 and inject the store repository into the Catalogue controller
    • Change the constructor name from Home controller to CatalogueController
    • Don’t forget to delete the sampleData() method if you haven’t already
  • Fetch the product list using the repository and pass it to the view
  • Note that the repository returns an iQueryable but the view currently expects a List
    • So, change the model data type in the view to iQueryable<Product>
Test
  • Test that the catalogue page now loads from the database
Catalogue Product Filter
  • Follow the steps below to populate the side menu categories dynamically from the database
  • First you must add the following to _ViewImports.cs as we will be using our own tag helper
    • @addTagHelper *, SportsStore (use your namespace instead of SportsStore)
  • Create the Nav component as in Listing 8.6
  • For listing 8.7 replace the side menu in the Catalogue view (NOT in _Layout as per the text)
    • Delete the <ul> tag and content within it under the Browse Categories heading (head class)
    • This generated the old static menu, but we are not using it
    • Put the nav component under Browse Categories within the sidebar-categories div
Test
  • Run and check that the nav menu displays the sample text in place of the menu
Nav Menu
  • Next use Listing 8.8 and 8.9 to add the category buttons to the menu
  • For Listing 8.9 note that you have to create both the Components folder and the NavigationMenu sub folder (otherwise it won’t find the view if path is not correct)
  • Also in Listing 8.9 change the route parameters to go to the Catalogue controller Index method with the category parameter as shown below
  • And remove asp-route-productPage=”1″ as we are not using paging
    • Note don’t delete the closing >
  • Type these changes into the existing code to match the code below (rather than cutting and pasting the code itself)

    <a class=”btn btn-block btn-outline-secondary”

       asp-action=”Index” asp-controller=”Catalogue”

       asp-route-category=”@category”>

Test
  • Run and check that the nav menu contains the categories (it will not filter yet)
Add the Product filter
  • Modify the Catalogue controller Index method to filter the products that are displayed using the code below
  • Here we are adding the category parameter we added above to the route to the Catalogue Index method parameters and using it to filter the product list from the repository
  • Note you will need to import Linq to fix the error

public IActionResult Index(string category = null)

{

    ViewBag.pageName = “Catalogue”;

    return View(repository.Products

        .Where(p => category == null || p.Category == category));

}

Test
  • Run and check that the products are filtered by category
Set the Current Nav Item
  • In the Nav Component load the current category into the viewbag to set the nav button
    • See Listing 8.10 and add the additional line to the Nav Component invoke() method

ViewBag.SelectedCategory = RouteData?.Values[“category”];

  • We also need set a route to pass the category back to the Catalogue controller
  • We could do it in startup.cs as before
  • However, there is a simpler way to define routes in the controller (uses a TagHelper)
  • In the Catalogue controller above the index method add the two routes below (one with a category and one without)

        [Route(“Catalogue”)]

        [Route(“Catalogue/{category}”)]

        public IActionResult Index(string category = null)

        {   …

  • In the Nav Component view file
    • View/Shared/Components/NavigationMenu/Default.cshtml
  • Add the code to highlight the current category using the category we stored in the viewbag
  • Change   

<a class=”btn btn-block btn-outline-secondary”

to

       <a class=”btn btn-block

       @(category == ViewBag.SelectedCategory

           ? “btn-primary”: “btn-outline-secondary”)”

  • If the images disappear from the Catalogue page add a slash in front of the image path in the View/Shared/ProductSummary.cshtml

<img class=”card-img” src=”/img/product/@Model.Image” alt=””>

Test
  • Run and check that the current category is highlighted

Move on to the Assignment 2 Guide Part 2

Order Now
No Fields Found.
Universal Assignment (August 13, 2025) COIT12204 Web Site Design. Retrieved from https://universalassignment.com/coit12204-web-site-design/.
"COIT12204 Web Site Design." Universal Assignment - August 13, 2025, https://universalassignment.com/coit12204-web-site-design/
Universal Assignment June 22, 2022 COIT12204 Web Site Design., viewed August 13, 2025,<https://universalassignment.com/coit12204-web-site-design/>
Universal Assignment - COIT12204 Web Site Design. [Internet]. [Accessed August 13, 2025]. Available from: https://universalassignment.com/coit12204-web-site-design/
"COIT12204 Web Site Design." Universal Assignment - Accessed August 13, 2025. https://universalassignment.com/coit12204-web-site-design/
"COIT12204 Web Site Design." Universal Assignment [Online]. Available: https://universalassignment.com/coit12204-web-site-design/. [Accessed: August 13, 2025]

Please note along with our service, we will provide you with the following deliverables:

Please do not hesitate to put forward any queries regarding the service provision.

We look forward to having you on board with us.

Categories

Get 90%* Discount on Assignment Help

Most Frequent Questions & Answers

Universal Assignment Services is the best place to get help in your all kind of assignment help. We have 172+ experts available, who can help you to get HD+ grades. We also provide Free Plag report, Free Revisions,Best Price in the industry guaranteed.

We provide all kinds of assignmednt help, Report writing, Essay Writing, Dissertations, Thesis writing, Research Proposal, Research Report, Home work help, Question Answers help, Case studies, mathematical and Statistical tasks, Website development, Android application, Resume/CV writing, SOP(Statement of Purpose) Writing, Blog/Article, Poster making and so on.

We are available round the clock, 24X7, 365 days. You can appach us to our Whatsapp number +1 (613)778 8542 or email to info@universalassignment.com . We provide Free revision policy, if you need and revisions to be done on the task, we will do the same for you as soon as possible.

We provide services mainly to all major institutes and Universities in Australia, Canada, China, Malaysia, India, South Africa, New Zealand, Singapore, the United Arab Emirates, the United Kingdom, and the United States.

We provide lucrative discounts from 28% to 70% as per the wordcount, Technicality, Deadline and the number of your previous assignments done with us.

After your assignment request our team will check and update you the best suitable service for you alongwith the charges for the task. After confirmation and payment team will start the work and provide the task as per the deadline.

Yes, we will provide Plagirism free task and a free turnitin report along with the task without any extra cost.

No, if the main requirement is same, you don’t have to pay any additional amount. But it there is a additional requirement, then you have to pay the balance amount in order to get the revised solution.

The Fees are as minimum as $10 per page(1 page=250 words) and in case of a big task, we provide huge discounts.

We accept all the major Credit and Debit Cards for the payment. We do accept Paypal also.

Popular Assignments

Assignment Help in Goulburn

📚 Introduction Need Assignment Help in Goulburn, NSW? Our expert academic writers provide high-quality, plagiarism-free support for students studying locally or online. Whether you’re enrolled at TAFE NSW – Goulburn Campus, completing university degrees through distance education, or taking professional development courses, we help you excel in your studies while

Read More »

Assignment Help in Stanthorpe

📚 Introduction Looking for Assignment Help in Stanthorpe, Queensland? We provide professional academic support for students in the Southern Downs region. Whether you are completing studies at TAFE Queensland South West – Stanthorpe Campus, studying remotely through University of Southern Queensland (USQ), or doing specialised agricultural training, our expert writers

Read More »

Assignment Help in Emerald

📚 Introduction Need Assignment Help in Emerald, Queensland? We offer professional academic assistance for students studying in the Central Highlands region. Whether you are enrolled at Central Queensland University (CQU) Emerald Campus, studying online, or completing vocational training at TAFE Queensland Emerald, we provide plagiarism-free, high-quality work tailored to your

Read More »

Assignment Help in Longreach

📚 Introduction Looking for Assignment Help in Longreach, Queensland? We provide professional, plagiarism-free academic assistance tailored for students in rural and remote regions. Whether you’re studying at TAFE Queensland Longreach Campus, completing online courses with Central Queensland University (CQU), or participating in agricultural training, our experts are here to help.

Read More »

Assignment Help in Roma

📚 Introduction Need Assignment Help in Roma, Queensland? We provide expert, plagiarism-free academic assistance for students in Roma and surrounding regions. Whether you’re enrolled in TAFE Queensland South West, studying online with University of Southern Queensland (USQ), or completing a specialised rural training program, we tailor every assignment to your

Read More »

Assignment Help in Charleville

📚 Introduction Looking for Assignment Help in Charleville, Queensland? We assist local and remote students with plagiarism-free, high-quality academic work tailored to your course and institution requirements. Charleville, in the heart of south-west Queensland, is known for its strong agricultural sector, vocational training programs, and distance education opportunities. Many students

Read More »

Assignment Help in Mount Isa

📚 Introduction Need Assignment Help in Mount Isa, Queensland? Whether you’re studying mining engineering, nursing, trades, or business, our professional academic writers provide plagiarism-free, high-quality assignments tailored to your course requirements. Mount Isa is one of Australia’s largest mining towns and a hub for students pursuing TAFE Queensland, James Cook

Read More »

Assignment Help in Airlie Beach

📚 Introduction Looking for Assignment Help in Airlie Beach, Queensland? Whether you’re studying tourism, hospitality, marine biology, or business, our expert academic writers provide plagiarism-free, high-quality assignments tailored to your course and university guidelines. Airlie Beach, the gateway to the Whitsundays, is not just a tourist hotspot — it’s also

Read More »

Assignment Help in Atherton

📚 Introduction Need Assignment Help in Atherton, Queensland? We offer professional academic assistance for high school, TAFE, and university students in Atherton and the surrounding Tablelands region. From essays and research projects to technical and vocational assignments, our experts deliver plagiarism-free, well-researched, and course-specific solutions. 🎓 Education in Atherton Atherton

Read More »

Assignment Help in Innisfail

📚 Introduction Looking for Assignment Help in Innisfail, Queensland? We provide professional academic support for high school, TAFE, and university students in Innisfail and the Cassowary Coast region. Whether it’s essays, reports, research projects, or technical assignments, our experts ensure plagiarism-free, well-structured work tailored to your course requirements. 🎓 Education

Read More »

Assignment Help in Yeppoon

📚 Introduction Need Assignment Help in Yeppoon, Queensland? Our expert academic team supports high school, TAFE, and university students in Yeppoon and nearby Capricorn Coast areas. We specialise in essays, research projects, case studies, and technical reports—ensuring plagiarism-free, high-quality work tailored to your needs. 🎓 Education in Yeppoon Yeppoon, located

Read More »

Assignment Help in Colac

📚 Introduction Looking for Assignment Help in Colac, Victoria? We provide reliable academic writing, research, and tutoring services for high school, TAFE, and university students in Colac and surrounding areas. Whether you’re working on essays, reports, projects, or technical papers, our experts deliver plagiarism-free, high-quality assignments tailored to your subject

Read More »

Assignment Help in Bairnsdale

📚 Introduction Need Assignment Help in Bairnsdale, Victoria? We provide expert academic writing and tutoring support for secondary, TAFE, and university students in Bairnsdale and the wider East Gippsland region. Whether it’s essays, research papers, reports, case studies, or technical projects, we deliver high-quality, plagiarism-free work tailored to your course

Read More »

Assignment Help in Wodonga

📚 Introduction Looking for Assignment Help in Wodonga, Victoria? Our professional academic writing services assist university, TAFE, and high school students across Wodonga and the wider Albury–Wodonga region. Whether you need help with essays, research papers, case studies, reports, or technical assignments—we deliver high-quality, plagiarism-free work on time. 🎓 Education

Read More »

Assignment Help in Wangaratta

📚 Introduction Need reliable Assignment Help in Wangaratta, Victoria? Our expert academic writing services support university, TAFE, and high school students in Wangaratta and the surrounding North East Victoria region. We help with essays, reports, case studies, research papers, and more—delivered on time and tailored to your academic requirements. 🎓

Read More »

Assignment Help in Sale

📚 Introduction Looking for reliable Assignment Help in Sale, Victoria? We provide expert academic writing services for university, TAFE, and high school students in Sale and the surrounding Gippsland region. Whether you need help with essays, research papers, case studies, or technical reports, our qualified writers deliver high-quality, plagiarism-free work

Read More »

Assignment Help in Morwell

📚 Introduction Need professional Assignment Help in Morwell? Whether you’re a university, TAFE, or vocational student, our expert academic writers help you meet deadlines and achieve top grades. We understand the unique challenges faced by local and international students in Morwell and provide customised support for all academic needs. 🎓

Read More »

Assignment Help in Traralgon

📚 Introduction Studying in Traralgon and feeling overwhelmed with assignments? Our Assignment Help in Traralgon service is designed to help local and international students excel academically while balancing work, study, and personal commitments. 🎓 Education in Traralgon Traralgon, located in the Latrobe Valley of Victoria, is an important education hub

Read More »

Assignment Help in Mildura

📚 Introduction If you’re a student in Mildura juggling studies, part-time work, and personal commitments, our Assignment Help in Mildura service is here to make your academic journey smoother. We provide expert assistance tailored to your subject area, helping you submit high-quality work on time. 🎓 Education in Mildura Mildura

Read More »

Assignment Help in Warrnambool

📚 Introduction Balancing studies, work, and personal life can be challenging for students in Warrnambool. Our Assignment Help in Warrnambool service is designed to provide professional academic support so you can meet deadlines, improve grades, and focus on your learning. 🎓 Education in Warrnambool Warrnambool is an important educational hub

Read More »

Assignment Help in Shepparton

📚 Introduction Students in Shepparton often juggle academic work alongside employment and personal responsibilities. Our Assignment Help in Shepparton service provides expert, customised assistance to help you submit high-quality work on time and improve your grades. 🎓 Education in Shepparton Shepparton is a vibrant regional hub in Victoria, offering a

Read More »

Assignment Help in Barossa Valley

📚 Introduction Balancing academic life with personal and work commitments can be challenging for students in the Barossa Valley. Our Assignment Help in Barossa Valley service offers expert guidance to help you complete your coursework with confidence and on time. 🎓 Education in Barossa Valley The Barossa Valley, known for

Read More »

Assignment Help in Naracoorte

📚 Introduction Balancing study, work, and personal life in Naracoorte can be challenging, especially with demanding assignments and deadlines. Assignment Help in Naracoorte provides expert academic support to help you excel in your coursework with less stress. 🎓 Education in Naracoorte Naracoorte, located in South Australia’s Limestone Coast region, offers

Read More »

Assignment Help in Renmark

📚 Introduction Studying in Renmark can be rewarding, but assignments, projects, and deadlines can often become overwhelming. Assignment Help in Renmark offers professional academic assistance to help students achieve their study goals without stress. 🎓 Education in Renmark Renmark, located in South Australia’s Riverland region, provides quality learning opportunities, including:

Read More »

Assignment Help in Victor Harbor

📚 Introduction Balancing studies, work, and personal life can be a challenge for students in Victor Harbor. Assignment Help in Victor Harbor provides expert academic support so you can meet deadlines and improve your grades without unnecessary stress. 🎓 Education in Victor Harbor Victor Harbor is a scenic coastal city

Read More »

Assignment Help in Murray Bridge

📚 Introduction Studying in Murray Bridge while juggling work, family, and other commitments can be stressful. Assignment Help in Murray Bridge offers reliable academic assistance, helping students meet deadlines with well-researched, plagiarism-free work so they can focus on learning without the pressure. 🎓 Education in Murray Bridge Murray Bridge is

Read More »

Assignment Help in Gawler

📚 Introduction Balancing studies, part-time work, and personal commitments can be challenging for students in Gawler. Assignment Help in Gawler provides professional academic assistance to ensure you meet deadlines with high-quality, plagiarism-free work, reducing the stress of university and TAFE assessments. 🎓 Education in Gawler Gawler is a thriving regional

Read More »

Assignment Help in Whyalla

📚 Introduction Students in Whyalla often juggle academic work with part-time jobs, family commitments, and community activities. Assignment Help in Whyalla offers tailored academic support so you can submit high-quality, plagiarism-free work on time and reduce study-related stress. 🎓 Education in Whyalla Whyalla is an important regional education hub in

Read More »

Assignment Help in Port Lincoln

📚 Introduction Balancing coursework, part-time work, and personal life can be challenging for students in Port Lincoln. Assignment Help in Port Lincoln provides expert academic support—helping you submit well-researched, plagiarism-free work on time while reducing study stress. 🎓 Education in Port Lincoln Port Lincoln is home to vibrant learning opportunities,

Read More »

Assignment Help in Port Augusta

📚 Introduction With academic demands rising in Port Augusta, students often find themselves juggling lectures, part-time jobs, and deadlines. This is where Assignment Help in Port Augusta becomes a game-changer—offering expert guidance, plagiarism-free work, and fast delivery so you can focus on learning without the stress of missed deadlines. 🎓

Read More »

Can't Find Your Assignment?