Beispiel #1
0
        public async Task <ActionResult <InstanceEvent> > GetOne(int instanceOwnerPartyId, Guid instanceGuid, Guid eventGuid)
        {
            string        instanceId = $"{instanceOwnerPartyId}/{instanceGuid}";
            InstanceEvent theEvent   = await _repository.GetOneEvent(instanceId, eventGuid);

            if (theEvent != null)
            {
                return(Ok(theEvent));
            }
            else
            {
                return(NotFound());
            }
        }
        public async Task <ActionResult> GetOne(int instanceOwnerPartyId, Guid instanceGuid, Guid eventGuid)
        {
            try
            {
                string        instanceId = $"{instanceOwnerPartyId}/{instanceGuid}";
                InstanceEvent theEvent   = await _repository.GetOneEvent(instanceId, eventGuid);

                if (theEvent != null)
                {
                    return(Ok(theEvent));
                }
                else
                {
                    return(NotFound());
                }
            }
            catch (Exception e)
            {
                return(StatusCode(500, $"Exception {e.Message}"));
            }
        }