Ejemplo n.º 1
0
 public IActionResult UpdateTelefon(int telefonId, [FromBody] TelefonView telefon)
 {
     try
     {
         DataProvider.UpdateTelefon(telefonId, telefon);
         return(Ok());
     }
     catch (Exception exception)
     {
         return(BadRequest(exception.ToString()));
     }
 }
Ejemplo n.º 2
0
 public IActionResult AddTelefon(int narodniPoslanikId, [FromBody] TelefonView telefon)
 {
     try
     {
         DataProvider.CreateTelefon(narodniPoslanikId, telefon);
         return(Ok());
     }
     catch (Exception exception)
     {
         return(BadRequest(exception.ToString()));
     }
 }