Hi @Coreysan ,
In MVC Razor view, the @model
directive allows access to the object that the controller passed to the view. The Model
object is strongly typed, it will get transferred model from the ViewData.
So, in your scenario, if you set break point it check Model in the @if
condition, you can see no matter using Model
or @Model
, they all get the strongly typed model. But inside the if statement, if you are using the Model
or @Model
, you can see the difference: use the @Model
, it will display the value.
More detail about the Razor syntax, see Razor syntax reference for ASP.NET Core and Strongly typed models and the [@](/users/na/?userId=0f55de7e-bffd-0003-0000-000000000000) directive
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Best regards,
Dillion