Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions ASP.NET Core/Controllers/HomeController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ namespace ASP_NET_Core.Controllers;
public class HomeController: Controller {
public IActionResult Index() {
var model = new ExportDashboardViewModel {
Employees = DemoData.Employees,
ChartData = DemoData.StateProducts
StateProducts = DemoData.StateProducts
};

return View(model);
Expand Down
21 changes: 0 additions & 21 deletions ASP.NET Core/Controllers/SampleDataController.cs

This file was deleted.

14 changes: 0 additions & 14 deletions ASP.NET Core/Models/DemoData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,6 @@
namespace ASP_NET_Core.Models;

public static class DemoData {
public static List<Employee> Employees { get; } =
[
new() { ID = 1, FirstName = "John", LastName = "Heart", Position = "CEO", State = "California", City = "Los Angeles" },
new() { ID = 2, FirstName = "Olivia", LastName = "Peyton", Position = "Sales Assistant", State = "California", City = "Los Angeles" },
new() { ID = 3, FirstName = "Robert", LastName = "Reagan", Position = "CMO", State = "Arkansas", City = "Bentonville" },
new() { ID = 4, FirstName = "Greta", LastName = "Sims", Position = "HR Manager", State = "Georgia", City = "Atlanta" },
new() { ID = 5, FirstName = "Brett", LastName = "Wade", Position = "IT Manager", State = "Idaho", City = "Boise" },
new() { ID = 6, FirstName = "Sandra", LastName = "Johnson", Position = "Controller", State = "Utah", City = "Beaver" },
new() { ID = 7, FirstName = "Kevin", LastName = "Carter", Position = "Shipping Manager", State = "California", City = "San Diego" },
new() { ID = 8, FirstName = "Cynthia", LastName = "Stanwick", Position = "HR Assistant", State = "Arkansas", City = "Little Rock" },
new() { ID = 9, FirstName = "Kent", LastName = "Samuelson", Position = "Ombudsman", State = "Missouri", City = "St. Louis" },
new() { ID = 10, FirstName = "Taylor", LastName = "Riley", Position = "Network Admin", State = "California", City = "San Jose" }
];

public static List<StateProductData> StateProducts { get; } =
[
new() { State = "Illinois", Year1998 = 423.721m, Year2001 = 476.851m, Year2004 = 528.904m },
Expand Down
10 changes: 0 additions & 10 deletions ASP.NET Core/Models/Employee.cs

This file was deleted.

3 changes: 1 addition & 2 deletions ASP.NET Core/Models/ExportDashboardViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@
namespace ASP_NET_Core.Models;

public class ExportDashboardViewModel {
public List<Employee> Employees { get; set; } = [];
public List<StateProductData> ChartData { get; set; } = [];
public List<StateProductData> StateProducts { get; set; } = [];
}
Loading
Loading