title: How do you use enum inside switch statement using MVC & razor view engine?
body: <p>I have a service which returns a Json data structure. One of the properties in the data is an enum value. When the Json is returned inside the client, I'd like it to react to the data returned using a switch statement.</p>
  
  <p>I don't want to hard-code the enum values in the javascript, so I tried using case <code>@MyEnum.Value</code>, but the view renders it simply as <code>'Value'</code>. I need it to output the actual value of the enum for it to work.</p>
  
  <p>How can I get this to work, or alternatively is there a better method for handling this situation?</p>