public async Task <List <Turn> > GetTurns(DateTime?dateTurn, Guid?medicId) { try { _ = Task.Run(() => { _logger.Info($"{dateTurn} Turnos llegaron correctamente"); return(Task.CompletedTask); }); return(await _turnRepository.GetList(dateTurn, medicId)); } catch (Exception ex) { _logger.Error(ex.Message, ex); return(null); } }
public void Delete(TimeTurnViewModel timeTurn) { try { _timeTurnRepository.DeleteTT(timeTurn); _logger.Info($"Tiempo {timeTurn.Id} eliminado correctamente"); } catch (Exception ex) { _logger.Error(ex.Message, ex); } }
public async Task Create(Medic medic) { try { //_ = Task.Run(async () => //{ _logger.Info($"Creado Medico {medic.Id}"); //}); await _medicRepository.NewMedic(medic); } catch (Exception ex) { _logger.Error(ex.Message, ex); } }
public async Task <TimeTurnViewModel> GetTimeTurn(Guid id) { try { //_ = Task.Run(async () => //{ _logger.Info($"Tiempo {id} obtenido"); //}); return(await _timeTurnRepository.GetbyId(id)); } catch (Exception ex) { _logger.Error(ex.Message, ex); return(null); } }