public void Delete(FileAttachmentModel entity, Guid AttachGroupID)
        {
            objAttachment = new CRM_AttachmentRepository();

            if (objAttachment.GetAll(a => a.AttachGroupID == AttachGroupID && a.AttachFileID == entity.AttachFileID).Count() > 0)
            {
                CRM_Attachments deleteRecord = objAttachment.GetSingle(a => a.AttachGroupID == AttachGroupID && a.AttachFileID == entity.AttachFileID);

                objAttachment.Delete(deleteRecord);
            }
        }
        public FileAttachmentModel getAttachInfoByID(Guid attachGroupID, Guid attachFileID)
        {
            objAttachment = new CRM_AttachmentRepository();

            Mapper.CreateMap<CRM_Attachments, FileAttachmentModel>();
            objAttachment = new CRM_AttachmentRepository();

            CRM_Attachments objEntity = objAttachment.GetSingle(a => a.AttachGroupID == attachGroupID && a.AttachFileID == attachFileID);

            FileAttachmentModel objResult = new FileAttachmentModel();

            objResult = Mapper.Map(objEntity, objResult);

            return objResult;
        }