public IActionResult RegisterForOneDayTrip([FromBody] OneDayTripRegistrant reg)
 {
     if (_service.RegisterForOneDayTrip(reg))
     {
         return(Ok(reg));
     }
     else
     {
         return(BadRequest("there is a error"));
     }
 }
        //get details of a selected event


        public Boolean RegisterForOneDaytrip(OneDayTripRegistrant reg)
        {
            try
            {
                _context.OneDayTripRegistrants.Add(reg);
                _context.SaveChanges();

                return(true);
            }
            catch
            {
                return(false);
            }
        }
예제 #3
0
        //method for get details of a selected event


        public Boolean RegisterForOneDayTrip(OneDayTripRegistrant reg)
        {
            return(_service.RegisterForOneDaytrip(reg));
        }