public async Task <IActionResult> DeletCreditCard(int?id) { if (id == null) { return(NotFound()); } var creditCard = await _context.CreditCard.SingleOrDefaultAsync(x => x.IdCard == id); _context.Remove(creditCard); _context.SaveChanges(); return(RedirectToAction("CreditCardClient", new { idClient = creditCard.IdClient })); }
public void testCreateHotel([Bind("Stars,HotelName,DescriptionTable")] Hotels hotelPost) { context.Add(hotelPost); context.SaveChanges(); }
public void CreateHotel(Hotels hotels) { context.Add(hotels); context.SaveChanges(); }