联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-23:00
  • 微信:codinghelp

您当前位置:首页 >> OS作业OS作业

日期:2024-03-24 05:01

ACSIT - BCS Program

Enterprise Application Development (PROG73020) - quiz #2

Worth 4% of final course grade (4 marks total)

Due: Midnight on Jan 31 (Section 1) or Feb 2 (Section 2), 2024

Peer grading & feedback due midnight of the next night

Introduction

The goals of this quiz are for you to:

● Define a controller and an action on the controller that passes data to a view that displays the content dynamically using Razor syntax.

○ The data is retrieved from a DB using EF Core

● And use a razor view to dynamically display the results in an HTML table that is styled using Bootstrap

What you need to do

To complete this quiz you need to do all of the following:

● Complete the task as described below

● Submit your solution (by midnight of the day of your quiz) as a single zip file to the eConestoga dropbox for the quiz so that ultimately I can associate a grade with it.

● Share your solution (again as a single zip file) with the student that has been randomly assigned to be your peer-grader and get theirs.

● Grade their solution, and provide feedback on it, to the student that you have been randomly assigned to grade. To do this you will use a Form. as a means of submitting the grade and code review feedback to me. Please submit your grade and feedback by midnight of the day after the quiz.

○ Remember: you only get the 4th mark on this if you properly grade your peer’s solution!

Peer-marking Details

First of all, please review the details of the peer-grading-rules document. It is available at the top level of the quizzes folder in eConestoga.

Also, I used a small Python program that randomly generated pairings for this quiz and the resulting Excel spreadsheet that provides these pairings is included in the eConestoga folder for this quiz. Please consult this spreadsheet to know who you are peer-grading and who is peer-grading your solution.

Finally, please use the Form. linked to in the eConestoga folder for this quiz to submit your grade and feedback for the student you have been randomly assigned to grade.

Your Task

For this quiz you are to complete a simple ASP.NET Core MVC based app that simply makes a connection to a database, queries for all the available stock transactions stored in the database, and then presents them in an HTML table.

Steps:

● Open the starting code solution

● In the Home/Index view, change this "Bart Simpson (student #: 123456)" to be your name and student number

● Ihe appsettings.json file, change the DB name so that it makes use of your student number, i.e. not 123456

● Complete the Transaction class in the Entities namespace:

○ It already has the following properties, including validation attributes: TransactionId, TickerSymbol, CompanyName, Quantity

○ Add the following 2 properties to complete the class:

■ SharePrice:

● A get/set property of type nullable double

● That is required

● And is only valid when the value is greater than 0.0

■ GrossValue:

● A get (i.e. read) only property, also of type nullable double, that simply returns the quantity of shares times the share price.

● Complete the DB context class, namely TransactionDbContext by:

○ Adding a property to access all transactions

○ Overriding the OnModelCreating method and use it as a place to seed the DB with at least 4 stock transactions

■ To help with this there is a code-snippets file included in the starting code zip file that contains some code that will help with this task

● Add MS Sql svr services in the Program.cs making use of the DB connection string retrieved from the appSettings.json file

● In the package manager console (PMC) add an Initial migration

● Then, also in the PMC, generate the DB

● In the Transaction controller:

○ Store a DB context object as a private data field

○ Then define a List action that uses the db context to get all the transactions, order alphabetically by company name, and return them to the model as a list

● Define a corresponding "all transactions" view named List.cshtml:

○ Declare model type as a list of Transaction objects

○ In the view, iterate (using a foreach loop) over the List to populate HTML table data

■ See the screenshot but you need to display a column for each Transaction object property, except the ID property

● Add a link to this "all transactions" page from the Home/Index view

● Try to run it

For your convenience here is a screenshot of how the resulting “all transactions” page should look:

Grading

Grading of this quiz is a simple 0, 1, 2, or 3 and is and based on the following scale:

Grade

Description

3

The solution builds and runs without errors and all 3 of the following criteria are met:

The app successfully connects to the database and is able to query for all transactions

Note: the DB should be seeded with at least 4 transactions.

The all transactions page works and displays in an HTML table (styled using Bootstrap) all the stock transactions retrieved from the database.

Please see the screenshot above.

The columns in the table are correct, including the Gross Value, and the currency values are formatted correctly.

2

The solution builds and runs with some functionality present but at least 1 of the above criteria has not been met.

1

A poor or minimal solution was submitted. For instance, it might build and run but almost none of the functionality is present, or there might be some code provided but it either fails to build or runs with errors.

0

No solution submitted or no code attempted in the solution.



版权所有:留学生编程辅导网 2020 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。 站长地图

python代写
微信客服:codinghelp