public bool Create(Car car) { try { F_Car f_cars = new F_Car(); f_cars.Insert(car); return(true); } catch (Exception e) { return(false); } }
public ActionResult Create(Car car) { try { F_Car f_cars = new F_Car(); f_cars.Insert(car); return(RedirectToAction("Index")); } catch (Exception e) { TempData["Error"] = e.Message.ToString(); return(RedirectToAction("Create")); } }