public async Task <ActionResult <string> > Delete(int id) { var findType = await _context.TypeEvents.FindAsync(id); if (findType == null) { return(NotFound()); } _context.Remove(findType); await _context.SaveChangesAsync(); return(Ok("Suppression éffectuée")); }
public async Task <ActionResult <string> > Delete(int id) { var findPromoteur = await _context.Promoteurs.FindAsync(id); if (findPromoteur == null) { return(NotFound()); } _context.Remove(findPromoteur); return(Ok("Suppression éffectuée")); }
public async Task <ActionResult <string> > Delete(int id) { var findUser = await _context.Users.FindAsync(id); if (findUser == null) { return(NotFound("Utilisateur introuvable")); } _context.Remove(findUser); await _context.SaveChangesAsync(); return(Ok("Suppression éffectuée")); }