I recently was asked why to use ContentResult instead of returning string. Unfortunately I could not give a better answer than: \"It is best practi
You can't return a string on a method which returns an ActionResult, so this is when you could use a ContentResult to return a plain string like so:
public ContentResult Hello()
{
return Content("hello world!");
}
ContentResult by default returns a type of text/plain. If you only ever needed to return a string, then you would use the method to return a string