Last active
April 21, 2020 14:49
-
-
Save DominicFinn/49420b95432ce70035eba385765e8ac3 to your computer and use it in GitHub Desktop.
Avoid this
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
using System; | |
namespace DeepObjects.Models | |
{ | |
internal enum CatStatus | |
{ | |
Outstanding | |
} | |
internal sealed class CatDetails | |
{ | |
public CatStatus Status { get; set; } | |
public string CatMessage { get; set; } | |
} | |
internal sealed class Cat | |
{ | |
public CatDetails Status { get; set; } | |
} | |
internal sealed class IndexViewModel | |
{ | |
public Cat Cat { 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
@model IndexViewModel | |
@{ | |
ViewData["Title"] = "guaranteed problem page"; | |
} | |
<div class="text-center"> | |
<h1 class="display-4">Welcome</h1> | |
@if(string.IsNullOrEmpty(Model?.Cat?.Status?.CatMessage)) | |
{ | |
<p>What is happening to me....?</p> | |
<p>Why am I here?</p> | |
} | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment