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 IList<FileAttachmentModel> getAll()
        {
            Mapper.CreateMap<CRM_Attachments, FileAttachmentModel>();
            objAttachment = new CRM_AttachmentRepository();

            IList<CRM_Attachments> objEntity = objAttachment.GetAll().ToList();

            IList<FileAttachmentModel> objResult = new List<FileAttachmentModel>();

            objResult = Mapper.Map(objEntity, objResult);

            return objResult;
        }
        public IList<FileAttachmentModel> getAttachListByID(Guid attachGroupID)
        {
            objAttachment = new CRM_AttachmentRepository();

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

            IList<CRM_Attachments> objEntity =objAttachment.GetAll(a => a.AttachGroupID == attachGroupID).ToList();

            IList<FileAttachmentModel> objResult = new List<FileAttachmentModel>();

            objResult = Mapper.Map(objEntity, objResult);

            return objResult;
        }