internal async Task Update(TrainEntity train) { context.Set <TrainEntity>().Update(train); await context.SaveChangesAsync(); }
public static bool IsSatisfiedBy(TrainEntity train, PassengerEntity passenger) { return(train.Passengers.Count < train.Limit); }
internal async Task Add(TrainEntity train) { context.Set <TrainEntity>().Add(train); await context.SaveChangesAsync(); }