Exemple #1
0
 public async Task <IActionResult> PerfilCreateAsync(PerfilView dados)
 {
     try
     {
         var _app = new appPerfil();
         //Chamando camada de aplicação
         return(Ok(await _app.CreateAsync(dados)));
     }
     catch (ArgumentException e)
     {
         return(StatusCode((int)HttpStatusCode.InternalServerError, e.Message));
     }
 }
Exemple #2
0
 public async Task <IActionResult> PerfilDeleteByIdAsync(int id)
 {
     try
     {
         var _app = new appPerfil();
         //Chamando camada de aplicação
         return(Ok(await _app.DeleteAsyncById(id)));
     }
     catch (ArgumentException e)
     {
         return(StatusCode((int)HttpStatusCode.InternalServerError, e.Message));
     }
 }