Beispiel #1
0
        private async Task SaveParty(IUnitOfWork uow, List <Party> partyList)
        {
            if (partyList == null)
            {
                return;
            }

            foreach (Party party in partyList)
            {
                Party foundParty = await partyService.GetByID(uow.Context, party.Id);

                if (foundParty == null)
                {
                    await partyService.Insert(uow, party);
                }
                else
                {
                    await partyService.Update(uow, party);
                }
            }
        }