public GetTokenIdByCentroIdResponse GetTokenIdByCentroId(int centroId) { GetTokenIdByCentroIdResponse response = new GetTokenIdByCentroIdResponse(); try { var centro = _centroRepository.GetOne(x => x.CentroId == centroId); response.tokenId = centro.CuentaTokenId == null ? 0 : (int)centro.CuentaTokenId; response.IsValid = true; } catch (Exception ex) { response.IsValid = false; response.ErrorMessage = ex.Message; } return(response); }
public GetTokenIdByCentroIdResponse GetTokenIdByCentroId(int centroId) { GetTokenIdByCentroIdResponse response = new GetTokenIdByCentroIdResponse(); try { Graph.Entities.Centro centro = new Graph.Entities.Centro(); centro.CentroId = 98; centro.Nombre = "Sevilla"; centro.CuentaTokenId = 1; response.tokenId = centro.CuentaTokenId == null ? 0 : (int)centro.CuentaTokenId; response.IsValid = true; } catch (Exception ex) { response.IsValid = false; response.ErrorMessage = ex.Message; } return(response); }