// POST api/Employees
        public HttpResponseMessage PostEmployeeInfo(EmployeeInfo employeeinfo)
        {
            if (ModelState.IsValid)
            {
                db.EmployeeInfoes.AddObject(employeeinfo);
                db.SaveChanges();

                HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.Created, employeeinfo);
                response.Headers.Location = new Uri(Url.Link("DefaultApi", new { id = employeeinfo.EmpNo }));
                return response;
            }
            else
            {
                return Request.CreateResponse(HttpStatusCode.BadRequest);
            }
        }
        // PUT api/Employees/5
        public HttpResponseMessage PutEmployeeInfo(int id, EmployeeInfo employeeinfo)
        {
            if (ModelState.IsValid && id == employeeinfo.EmpNo)
            {
                db.EmployeeInfoes.Attach(employeeinfo);
                db.ObjectStateManager.ChangeObjectState(employeeinfo, EntityState.Modified);

                try
                {
                    db.SaveChanges();
                }
                catch (DbUpdateConcurrencyException)
                {
                    return Request.CreateResponse(HttpStatusCode.NotFound);
                }

                return Request.CreateResponse(HttpStatusCode.OK);
            }
            else
            {
                return Request.CreateResponse(HttpStatusCode.BadRequest);
            }
        }
 /// <summary>
 /// Deprecated Method for adding a new object to the EmployeeInfoes EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToEmployeeInfoes(EmployeeInfo employeeInfo)
 {
     base.AddObject("EmployeeInfoes", employeeInfo);
 }
 /// <summary>
 /// Create a new EmployeeInfo object.
 /// </summary>
 /// <param name="empNo">Initial value of the EmpNo property.</param>
 /// <param name="empName">Initial value of the EmpName property.</param>
 /// <param name="salary">Initial value of the Salary property.</param>
 /// <param name="deptName">Initial value of the DeptName property.</param>
 /// <param name="designation">Initial value of the Designation property.</param>
 public static EmployeeInfo CreateEmployeeInfo(global::System.Int32 empNo, global::System.String empName, global::System.Decimal salary, global::System.String deptName, global::System.String designation)
 {
     EmployeeInfo employeeInfo = new EmployeeInfo();
     employeeInfo.EmpNo = empNo;
     employeeInfo.EmpName = empName;
     employeeInfo.Salary = salary;
     employeeInfo.DeptName = deptName;
     employeeInfo.Designation = designation;
     return employeeInfo;
 }