public IActionResult Get(int id) { try { Client objClient = _service.Get(id); objClient.Nit = Encripter.Decrypt(objClient.Nit); return(Ok(objClient)); } catch (Exception ex) { logger.Error(ex.Message + " - " + ex.StackTrace); return(BadRequest()); } }
public IActionResult Get() { try { List <Client> lstClents = new List <Client>(); foreach (var item in _service.Get()) { item.Nit = Encripter.Decrypt(item.Nit); lstClents.Add(item); } return(Ok(lstClents)); } catch (Exception ex) { logger.Error(ex.Message + " - " + ex.StackTrace); return(BadRequest()); } }