Ejemplo n.º 1
0
        public async Task <Guid> AddSchedulerAsync(Scheduler request)
        {
            try
            {
                var entity = await _schedulerRepository.AddAsync(request);

                await _schedulerRepository.CommitAsync();

                return(entity.Id);
            }
            catch (Exception ex)
            {
                await _mediator.Publish(new Notification("SchedulerService_Exception", $"Ocorreu um erro ao tentar criar o agendamento."));
            }
            return(new Guid());
        }