/// <summary> /// 创建一个新实例 /// </summary> /// <param name="pEntity">实体实例</param> public void Create(T_UserEntity pEntity) { _currentDAO.Create(pEntity); try { var msg = new EventContract { Operation = OptEnum.Create, EntityType = EntityTypeEnum.User, Id = pEntity.user_id }; var service = new EventService(); service.PublishMsg(msg); } catch (Exception) { throw new Exception("RabbitMQ Error"); } }