public JsonResult Attachments(string entity, string entityId) { var attachment = CloudTableRepository.GetAttachments(entity, entityId); var result = new { Attachment = attachment ?? new AttachmentDTO(), AttachmentTypeList = LookupRepository.AttachmentTypeList.FirstOrDefault(x => x.Entity == entity)?.Types }; return(Json(result, JsonRequestBehavior.AllowGet)); }