public ActionResult Create() { var vm = new BarbersServicesVM { Barbers = _context.Barbers, Services = _context.Services }; return(View(vm)); }
public ActionResult Edit(int?Id) { if (Id == null) { return(HttpNotFound("Id gelmir la")); } var serviceTobarber = _context.ServicetoBarbers.Find(Id); ViewBag.barberId = serviceTobarber.BarberId; ViewBag.ServiceId = serviceTobarber.ServiceId; var vm = new BarbersServicesVM { Barbers = _context.Barbers, Services = _context.Services }; if (serviceTobarber == null) { return(HttpNotFound("Service Item yok la")); } return(View(vm)); }