Exemplo n.º 1
0
        //GET api/Events/GetEventsByAgeGenderAndEventCode
        public IHttpActionResult GetEventsByAgeGenderAndEventCode(string age, string gender, string eventCode)
        {
            if (!EventCodes.Contains(eventCode))
            {
                return(BadRequest("Event Code is not valid and must be match the neutral file format standard"));
            }
            if (!Gender.Contains(gender))
            {
                return(BadRequest("Gender entered is not valid it must be either M, F, or Mix"));
            }

            return(Ok(_eventRepo.GetEventsByAgeGenderAndEventCode(age, gender, eventCode)));
        }