EasyBike.Models.ContractService.RemoveContractAsync C# (CSharp) Method

RemoveContractAsync() public method

public RemoveContractAsync ( Contract contract ) : Task
contract Contract
return Task
        public async Task RemoveContractAsync(Contract contract)
        {
            await _storageService.RemoveContractAsync(contract).ConfigureAwait(false);
            foreach (var station in stations.Where(s => s.ContractStorageName == contract.StorageName).ToList())
            {
                stations.Remove(station);
            }
            contracts.Remove(contract);
        }