public void GetIdeaAttachments(RestAPIGetAttachmentsResponse response, int IdeaId)
        {
            List <RESTAPIIdeaAttachmentsInterchange> attachmentInterchangeList = null;
            List <IdeaAttachment> attachmentlist = null;

            DatabaseWrapper.databaseOperation(response,
                                              (context, query) =>
            {
                attachmentInterchangeList = new List <RESTAPIIdeaAttachmentsInterchange>();
                attachmentlist            = new List <IdeaAttachment>();

                attachmentlist = query.GetIdeaAttachmentsByIdeaId(context, IdeaId);
                if (attachmentlist.Count > 0)
                {
                    foreach (var attachment in attachmentlist)
                    {
                        if (attachment.FolderName != Enum.GetName(typeof(folderNames), folderNames.DefaultImage))
                        {
                            RESTAPIIdeaAttachmentsInterchange commentInterchange = new RESTAPIIdeaAttachmentsInterchange(attachment);
                            attachmentInterchangeList.Add(commentInterchange);
                        }
                    }
                }
                response.Status = Success;
            }
                                              , readOnly: true
                                              );

            if (attachmentInterchangeList != null && attachmentInterchangeList.Count > 0)
            {
                response.IdeaAttachmentList.AddRange(attachmentInterchangeList);
            }
        }
        public RestAPIGetAttachmentsResponse GetIdeaAttachments([FromUri] int IdeaId)
        {
            RestAPIGetAttachmentsResponse response = new RestAPIGetAttachmentsResponse();

            ideaUtil.GetIdeaAttachments(response, IdeaId);

            return(response);
        }