public async Task <IActionResult> Create([Bind("ConsumerId,FirstName,LastName,Address,Zip,Email,PhoneNumber")] Consumer consumer) { if (ModelState.IsValid) { _context.Add(consumer); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(consumer)); }
public async Task <IActionResult> Create([Bind("BarberId,FirstName,LastName,BarberAddress,Zip")] Barber barber) { if (ModelState.IsValid) { _context.Add(barber); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(barber)); }
public async Task <IActionResult> Create([Bind("Zip1,City,State,Country")] Zip zip) { if (ModelState.IsValid) { _context.Add(zip); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(zip)); }
public async Task <IActionResult> Create([Bind("BarberId,PhoneNumber,OperationHours,DaysOfWeek,PolicyInfo")] BarberDetails barberDetails) { if (ModelState.IsValid) { _context.Add(barberDetails); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["BarberId"] = new SelectList(_context.Barber, "BarberId", "BarberId", barberDetails.BarberId); return(View(barberDetails)); }
public async Task <IActionResult> Create([Bind("BarberId,ServiceTitle,ServiceDescription")] Services services) { if (ModelState.IsValid) { _context.Add(services); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["BarberId"] = new SelectList(_context.Barber, "BarberId", "BarberId", services.BarberId); return(View(services)); }
public async Task <IActionResult> Create([Bind("RatingId,BarberId,ConsumerId,RatingNumber,Comments")] Ratings ratings) { if (ModelState.IsValid) { _context.Add(ratings); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["BarberId"] = new SelectList(_context.Barber, "BarberId", "BarberId", ratings.BarberId); ViewData["ConsumerId"] = new SelectList(_context.Consumer, "ConsumerId", "ConsumerId", ratings.ConsumerId); return(View(ratings)); }
public async Task <IActionResult> Create([Bind("AppointmentId,BarberId,ConsumerId,Date")] Appointments appointments) { if (ModelState.IsValid) { _context.Add(appointments); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["BarberId"] = new SelectList(_context.Barber, "BarberId", "BarberId", appointments.BarberId); ViewData["ConsumerId"] = new SelectList(_context.Consumer, "ConsumerId", "ConsumerId", appointments.ConsumerId); return(View(appointments)); }