Eventuous/dotnet-sample

await EnsureRoomAvailable(roomId, period, isRoomAvailable);

jenssc opened this issue · 4 comments

Hi
Isn't it a bug that nothing is using anything from the call to EnsureRoomAvailable ?
The code will never wait for anything to get completed and there by you end up creating the event before ensuring that the room is available.

It's definitely used

public class Booking : Aggregate<BookingState> {
public async Task BookRoom(
string guestId,
RoomId roomId,
StayPeriod period,
Money price,
Money prepaid,
DateTimeOffset bookedAt,
IsRoomAvailable isRoomAvailable
) {
EnsureDoesntExist();
await EnsureRoomAvailable(roomId, period, isRoomAvailable);

Ahhh... sorry :-)

@jenssc can this be closed?

Sure... my bad :-)