Skip to content

Commit

Permalink
Putting common using statements into _ViewImports.cshtml
Browse files Browse the repository at this point in the history
  • Loading branch information
gorohoroh committed Jul 6, 2018
1 parent b70b41c commit 043ba15
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
3 changes: 1 addition & 2 deletions OdeToFoodRider/OdeToFoodRider/Views/Home/Create.cshtml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@using OdeToFoodRider.Models
@model OdeToFoodRider.Models.Restaurant
@model Restaurant

@{
ViewBag.Title = "Create";
Expand Down
1 change: 0 additions & 1 deletion OdeToFoodRider/OdeToFoodRider/Views/Home/Details.cshtml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@using OdeToFoodRider.Models
@model Restaurant

@{
Expand Down
3 changes: 1 addition & 2 deletions OdeToFoodRider/OdeToFoodRider/Views/Home/Index.cshtml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@using OdeToFoodRider.Models
@model OdeToFoodRider.ViewModels.HomeIndexViewModel
@model HomeIndexViewModel

@{
ViewBag.Title = "Home page";
Expand Down
2 changes: 2 additions & 0 deletions OdeToFoodRider/OdeToFoodRider/Views/_ViewImports.cshtml
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
@using OdeToFoodRider.Models
@using OdeToFoodRider.ViewModels
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@* VSRD: No completion suggestions for assembly name in Rider, too :( - completion for @addTagHelper is available though *@
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@using OdeToFoodVisualStudio.Models
@model OdeToFoodVisualStudio.Models.Restaurant
@model Restaurant
@* VSRD: Visual Studio gives no import suggestions for model declaration - have to type in FQN (for which there is completion) *@

@{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@model OdeToFoodVisualStudio.Models.Restaurant
@model Restaurant

@{
ViewBag.Title = Model.Name;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@* VSRD: Visual Studio doesn't suggest importing the Restaurant model when typing @model Restaurant, so you have to type in the FQN. Let's see what Rider can do here :) *@
@model OdeToFoodVisualStudio.ViewModels.HomeIndexViewModel
@model HomeIndexViewModel

@{ ViewBag.Title = "Home page";
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@using OdeToFoodVisualStudio.Models;
@using OdeToFoodVisualStudio.ViewModels;
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@* VSRD: Visual Studio provides no completion for the assembly name above *@

0 comments on commit 043ba15

Please sign in to comment.