public async Task <IActionResult> Add() { var allcars = await this.carService.All(); AdminAddPartFormModel model = new AdminAddPartFormModel { Cars = allcars }; return(View(model)); }
public async Task <IActionResult> Edit(AdminAddPartFormModel part) { await this.service.EditPart(part.Id, part.Name, part.Price, part.Quantity, part.CarId, part.ImageUrl); return(this.RedirectToAction(nameof(All))); }