Skip to content

Commit

Permalink
attempting to do LaunchCode-Education-Archived#1, 2.1, 2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
marybellavia committed Dec 19, 2019
1 parent 0fbb427 commit b6bdb2f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/TechJobs/Controllers/JobController.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Microsoft.AspNetCore.Mvc;
using TechJobs.Data;
using TechJobs.ViewModels;
using TechJobs.Models;

namespace TechJobs.Controllers
{
Expand All @@ -18,9 +19,10 @@ static JobController()
// The detail display for a given Job at URLs like /Job?id=17
public IActionResult Index(int id)
{
// TODO #1 - get the Job with the given ID and pass it into the view
Job jerb = JobData.Find(id);

return View();
// TODO #1 - get the Job with the given ID and pass it into the view
return View(jerb);
}

public IActionResult New()
Expand Down
6 changes: 6 additions & 0 deletions src/TechJobs/Views/Job/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@
// TODO #2.1- declare the ViewModel (outside of this @{ } block)
}

@model TechJobs.ViewModels.JobFieldsViewModel

<table class="job-listing">
<tr>
<td>@Model.Fields</td>
</tr>

@{
// TODO #2.2 - display the job fields, one per row (outside of this @{ } block)
}
Expand Down

0 comments on commit b6bdb2f

Please sign in to comment.