public string MimeForEntityName(string entityName)
{
if(entityName.EndsWith(".html", StringComparison.InvariantCultureIgnoreCase))
return "text/html";
if (entityName.EndsWith (".text", StringComparison.InvariantCultureIgnoreCase))
return "text/plain";
return null;
}