private void DeleteAsset(int id) { Belligerent.Assets.Remove(Belligerent.Assets.FirstOrDefault(b => b.AssetId == id)); EventParticipantDataService.Update(Belligerent.EventParticipantId, Belligerent); AssetDataService.Delete(id); StateHasChanged(); }
public async void AddUnitAssetDialog_OnAssetAdded(Asset asset) { asset.EventParticipantId = Belligerent.EventParticipantId; var entry = await AssetDataService.Add(asset); Belligerent.Assets.Add(entry); await EventParticipantDataService.Update(Belligerent.EventParticipantId, Belligerent); StateHasChanged(); }