Esempio n. 1
0
        public IHttpActionResult Update(Employee emp)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }
            //var dataupdate = db.UpdateRecord(user.Id, user.Name, user.PhoneNo, user.City);
            db.UpdateRecord(emp.EmployeeID, emp.Name, emp.City, emp.Email, emp.Phone);
            db.SaveChanges();

            return(CreatedAtRoute("DefaultApi", new { id = emp.EmployeeID }, emp));
        }