//[Authorize] public async Task <IActionResult> GetAllAsync() // { AmigosDal am = new AmigosDal(); var Lista = await am.ListarAsync("Nome"); return(Ok(Lista)); }
public async Task <CodeMsg> DeleteAsync(int RowId) { CodeMsg cm; try { AmigosDal am = new AmigosDal(); cm = await am.DeletarAsync(RowId); } catch (Exception) { throw; } return(cm); }
public CodeMsg Delete(int RowId) { CodeMsg cm; try { AmigosDal am = new AmigosDal(); cm = am.Deletar(RowId); } catch (Exception) { throw; } return(cm); }
public CodeMsg Put(int id, [FromBody] AmigosMd amg) { CodeMsg cm; try { AmigosDal am = new AmigosDal(); cm = am.Incluir(amg); } catch (Exception) { throw; } return(cm); }
public AmigosMd GetByIdAsync(int id) { AmigosDal am = new AmigosDal(); return((AmigosMd)am.GetByIdAsync(id).Result); }
public AmigosMd GetById(int id) { AmigosDal am = new AmigosDal(); return(am.GetById(id)); }