コード例 #1
0
        public ActionResult <List <Event> > GetEvents(string characterId)
        {
            try
            {
                var events = repository.GetEvents(characterId);

                if (events == null)
                {
                    return(NotFound());
                }

                if (events.Count == 0)
                {
                    throw new Exception("Não foi possivel encontrar nenhum event com esse characterId");
                }

                return(events);
            }
            catch (Exception ex)
            {
                throw;
            }
        }