public ActionResult Create([Bind(Include = "Id,Name,Email,Phone,Make")] MechanicView mechanicview) { if (ModelState.IsValid) { _mechanicManager.AddMechanic(mechanicview); return(RedirectToAction("Index")); } return(View(mechanicview)); }
// POST: api/Mechanic public IHttpActionResult Post([FromBody] Mechanics mechanic) { var response = _IMechanicManager.AddMechanic(mechanic); return(Ok(response)); }