public async Task <Response <int> > Handle(CreateParty command) { var request = new InsertPartyRequest { Name = command.Name, Location = command.Location, StartTime = command.StartTime }; var newPartyId = await _dataProvider.InsertParty(request); return(SuccessHandler.ReturnInsertSuccess(newPartyId, EntityName)); }
public async Task <Response <int> > Handle(CreateGuest command) { var request = new InsertPartyGuestRequest { PartyId = command.PartyId, PersonId = command.PersonId, ChosenDrinkId = command.ChosenDrinkId, IsVIP = command.IsVip }; var newPartyId = await _dataProvider.InsertPartyGuest(request); return(SuccessHandler.ReturnInsertSuccess(newPartyId, EntityName)); }
public async Task <Response <int> > Handle(CreatePerson command) { var request = new InsertPersonRequest { FirstName = command.FirstName, LastName = command.LastName, DateOfBirth = command.DateOfBirth, Email = command.Email, Phone = command.Phone, FavouriteDrinkId = command.FavouriteDrinkId }; var newPartyId = await _dataProvider.InsertPerson(request); return(SuccessHandler.ReturnInsertSuccess(newPartyId, EntityName)); }
public async Task <Response <int> > Handle(CreateDrink command) { var newDrinkId = await _dataProvider.InsertDrink(command.Name); return(SuccessHandler.ReturnInsertSuccess(newDrinkId, EntityName)); }