Ejemplo n.º 1
0
        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.");
        }
Ejemplo n.º 2
0
 public LeapEventArgs(LeapEvent type)
 {
     this.type = type;
 }
Ejemplo n.º 3
0
 public LeapEventArgs(LeapEvent type)
 {
   this.type = type;
 }
Ejemplo n.º 4
0
        public ActionResult UpdateLeapEvent(LeapEvent leapEvent)
        {
            var updatedLeapEvent = _leapEventRepository.UpdateLeapEvent(leapEvent);

            return(Ok(updatedLeapEvent));
        }