public int AddLangToTrad([FromBody] objectToSend objeto) { int result; try { if (objeto.idIdioma != null && objeto.idTraductor != null) { result = objtraduct.AddIdiomaToTranslator(objeto.idIdioma, objeto.idTraductor); } else { result = -1; } } catch (NullReferenceException nullEx) { throw nullEx; } catch (Exception ex) { throw ex; } return(result); }
public int AddServiceToTrad([FromBody] objectToSend objeto) { int result; try { if (objeto.idServicio != null && objeto.idTraductor != null) { result = objtraduct.AddTraductoServicio(objeto.idServicio, objeto.idTraductor); } else { result = -1; } } catch (NullReferenceException nullEx) { throw nullEx; } catch (Exception ex) { throw ex; } return(result); }