public async Task <IActionResult> Edit(int id) { SahibindenBitirmeProjesi.Entity.Entities.Concrete.Models model = await _modelsRepository.GetById(id); ViewBag.CarId = new SelectList(await _carsRepository.Get(x => x.Status != Status.Passive), "Id", "Name", model.CarsId); return(View(model)); }
public async Task <IActionResult> GetById(int id) { try { return(Ok(await _modelsRepository.GetById(id))); } catch (InvalidDeviceException) { return(NotFound()); } }