public IHttpActionResult Post(Employee employee) { if (ModelState.IsValid) { employeeObjBs.Insert(employee); return(CreatedAtRoute("DefaultApi", new { id = employee.EmployeeId }, employee)); } else { return(BadRequest(ModelState)); } }
public IHttpActionResult Post(Employee employee) { if (ModelState.IsValid) { employeeObjBs.Insert(employee); return(CreatedAtRoute("DefaultApi", new { id = employee.EmployeeId }, employee)); } else { return(BadRequest(ModelState)); } }