示例#1
0
        public async Task <Response <EventNotification> > DeleteEvent(int dataId, int typeId)
        {
            try
            {
                var ev = await _repo.DeleteEvent(dataId, typeId);

                if (ev == null)
                {
                    throw new InputFormatterException($"Not found an Event with dataId={dataId} and typeId={typeId}");
                }
                await _unitWork.CommitAsync();

                return(new Response <EventNotification>(ev));
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                throw;
            }
        }