//// GET: Mecanics/Delete/5 public async Task <IActionResult> Delete(int?id) { if (id == null) { return(NotFound()); } var mechanic = await _mechanicRepository.GetByIdAsync(id.Value); if (mechanic == null) { return(NotFound()); } return(View(mechanic)); }
public async Task <IActionResult> GetMechanic(int Id) { var mechanic = await _mechanicRepository.GetByIdAsync(Id); return(Json(mechanic.FullName)); }