Exemple #1
0
        public Task UpdateParkingTerminal(ParkingTerminal parkingTerminal)
        {
            var foundParkingTerminal = GetParkingTerminal(parkingTerminal.Id).Result;

            if (foundParkingTerminal == null)
            {
                AddParkingTerminal(parkingTerminal);
            }
            else
            {
                if (foundParkingTerminal != parkingTerminal)
                {
                    _parkingTerminals.Remove(foundParkingTerminal);
                    _parkingTerminals.Add(parkingTerminal);
                }
            }
            return(Task.CompletedTask);
        }
Exemple #2
0
 public Task RemoveParkingTerminal(ParkingTerminal parkingTerminal)
 {
     _parkingTerminals.Remove(parkingTerminal);
     return(Task.CompletedTask);
 }
Exemple #3
0
 public Task AddParkingTerminal(ParkingTerminal parkingTerminal)
 {
     _parkingTerminals.Add(parkingTerminal);
     return(Task.CompletedTask);
 }