Beispiel #1
0
        public async Task <IActionResult> Delete(string id)
        {
            try
            {
                if (string.IsNullOrEmpty(id))
                {
                    return(NotFound());
                }

                await _livrobusiness.Delete(Convert.ToInt32(id));

                return(Ok("Item Deletado"));
            }
            catch (Exception e)
            {
                return(BadRequest($"{e.Message}"));
            }
        }
Beispiel #2
0
 protected override void Delete(Livro entity)
 {
     _livroBusiness.Delete(entity);
 }
Beispiel #3
0
 public IActionResult Delete(long id)
 {
     _livro.Delete(id);
     return(NoContent());
 }
Beispiel #4
0
 //[Authorize("Bearer")]
 public IActionResult Delete(int id)
 {
     _livroBusiness.Delete(id);
     return(NoContent());
 }