public JsonResult GetFileTags(String virtualPath) { DocumentsOperations docOps = new DocumentsOperations(); List <TagsOnFile> tags = docOps.GetTagsByFileID(docOps.GetFileIDByVirtualPath(virtualPath)); List <TagsMetadata> jsonTags = new List <TagsMetadata>(); foreach (TagsOnFile tag in tags) { jsonTags.Add(new TagsMetadata { TagName = tag.TagName, LastModified = tag.LastModifiedDateTime.ToString() }); } return(Json(new { Total = jsonTags.Count, Data = jsonTags })); }