public LeapEvent UpdateLeapEvent(LeapEvent leapEventToUpdate) { using (var db = new SqlConnection(ConnectionString)) { var rowsAffected = db.Execute(@"Update LeapEvents Set leaperId = @leaperId, leapeeEventId = @leapeeEventId, cost = @cost Where Id = @id", leapEventToUpdate); if (rowsAffected == 1) { return(leapEventToUpdate); } } throw new Exception("Could not update leapee."); }
public LeapEventArgs(LeapEvent type) { this.type = type; }
public LeapEventArgs(LeapEvent type) { this.type = type; }
public ActionResult UpdateLeapEvent(LeapEvent leapEvent) { var updatedLeapEvent = _leapEventRepository.UpdateLeapEvent(leapEvent); return(Ok(updatedLeapEvent)); }