-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Creating and using a view model for the Index view
- Loading branch information
Showing
6 changed files
with
45 additions
and
9 deletions.
There are no files selected for viewing
11 changes: 9 additions & 2 deletions
11
OdeToFoodRider/OdeToFoodRider/Controllers/HomeController.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
OdeToFoodRider/OdeToFoodRider/ViewModels/HomeIndexViewModel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
using System.Collections.Generic; | ||
using OdeToFoodRider.Models; | ||
|
||
namespace OdeToFoodRider.ViewModels | ||
{ | ||
public class HomeIndexViewModel | ||
{ | ||
public IEnumerable<Restaurant> Restaurants { get; set; } | ||
public string CurrentMessage { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 7 additions & 2 deletions
9
OdeToFoodVisualStudio/OdeToFoodVisualStudio/Controllers/HomeController.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
OdeToFoodVisualStudio/OdeToFoodVisualStudio/ViewModels/HomeIndexViewModel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
using OdeToFoodVisualStudio.Models; | ||
using System.Collections.Generic; | ||
|
||
namespace OdeToFoodVisualStudio.ViewModels | ||
{ | ||
public class HomeIndexViewModel | ||
{ | ||
public IEnumerable<Restaurant> Restaurants { get; set; } | ||
public string CurrentMessage { get; set; } | ||
} | ||
} |
6 changes: 4 additions & 2 deletions
6
OdeToFoodVisualStudio/OdeToFoodVisualStudio/Views/Home/Index.cshtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters