public static object get_templates(dynamic data) { var path = HttpContext.Current.Server.MapPath("~/Templates"); return Directory.Exists(path) ? from d in Directory.EnumerateDirectories(path) select Path.GetFileName(d) : data; }