Пример #1
0
        /// <summary>
        /// 修改街道办名称触发事件
        /// </summary>
        /// <param name="db"></param>
        /// <param name="dto"></param>
        /// <param name="token"></param>
        /// <returns></returns>
        private async Task OnUpdate(GuoGuoCommunityContext db, StreetOffice dto, CancellationToken token = default)
        {
            StreetOfficeIncrementer incrementer = new StreetOfficeIncrementer();

            //公告订阅
            AnnouncementRepository announcementRepository = new AnnouncementRepository();

            announcementRepository.OnSubscribe(incrementer);

            //站内信订阅
            StationLetterRepository stationLetterRepository = new StationLetterRepository();

            stationLetterRepository.OnSubscribe(incrementer);

            //投票订阅
            VoteRepository voteRepository = new VoteRepository();

            voteRepository.OnSubscribe(incrementer);

            //用户订阅
            UserRepository userRepository = new UserRepository();

            userRepository.OnSubscribe(incrementer);

            await incrementer.OnUpdate(db, dto, token);
        }
Пример #2
0
        private async Task OnUpdate(GuoGuoCommunityContext db, SmallDistrict dto, CancellationToken token = default)
        {
            SmallDistrictIncrementer incrementer = new SmallDistrictIncrementer();

            //公告订阅
            AnnouncementRepository announcementRepository = new AnnouncementRepository();

            announcementRepository.OnSubscribe(incrementer);

            //投票订阅
            VoteRepository voteRepository = new VoteRepository();

            voteRepository.OnSubscribe(incrementer);

            //业委会成员申请表
            VipOwnerApplicationRecordRepository vipOwnerApplicationRecordRepository = new VipOwnerApplicationRecordRepository();

            vipOwnerApplicationRecordRepository.OnSubscribe(incrementer);

            //用户
            UserRepository userRepository = new UserRepository();

            userRepository.OnSubscribe(incrementer);

            await incrementer.OnUpdate(db, dto, token);
        }