public async Task <int> InsertParty(InsertPartyRequest request) { var param = new ParamBuilder() .WithParam("Name", request.Name) .WithParam("Location", request.Location) .WithParam("StartTime", request.StartTime); var newId = await db.Insert(param); return(newId.ToInt()); }
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)); }