public async void VipOwnerStructureChanging(GuoGuoCommunityContext dbs, VipOwnerStructure vipOwnerStructure, CancellationToken token = default) { using (var db = new GuoGuoCommunityContext()) { await db.VipOwnerCertificationRecords.Where(x => x.VipOwnerStructureId == vipOwnerStructure.Id.ToString()).UpdateAsync(x => new VipOwnerCertificationRecord { VipOwnerStructureName = vipOwnerStructure.Name }); } }
private async Task OnUpdateAsync(GuoGuoCommunityContext db, VipOwnerStructure dto, CancellationToken token = default) { VipOwnerStructureIncrementer incrementer = new VipOwnerStructureIncrementer(); VipOwnerCertificationRecordRepository vipOwnerCertificationRecordRepository = new VipOwnerCertificationRecordRepository(); vipOwnerCertificationRecordRepository.OnSubscribe(incrementer); await incrementer.OnUpdate(db, dto, token); }
public async Task OnUpdate(GuoGuoCommunityContext db, VipOwnerStructure vipOwnerStructure, CancellationToken token = default) { await Task.Run(() => VipOwnerStructureEvent(db, vipOwnerStructure, token)); }