public Task SaveTraderAsync(Trader trader) { var items = Traders.Where(x => x.Identifier == trader.Identifier).ToList(); if (items.Count > 0) { foreach (var item in items) { Traders.Remove(item); } Traders.Add(trader); } else { Traders.Add(trader); } return(Task.FromResult(true)); }
public void Add(Trader trader) => Traders.Add(trader);