// POST: odata/Admin_Employee
        public IHttpActionResult Post(Admin_Employee admin_Employee)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            db.Admin_Employee.Add(admin_Employee);
            db.SaveChanges();

            return(Created(admin_Employee));
        }
        // DELETE: odata/Admin_Employee(5)
        public IHttpActionResult Delete([FromODataUri] int key)
        {
            Admin_Employee admin_Employee = db.Admin_Employee.Find(key);

            if (admin_Employee == null)
            {
                return(NotFound());
            }

            db.Admin_Employee.Remove(admin_Employee);
            db.SaveChanges();

            return(StatusCode(HttpStatusCode.NoContent));
        }
        // PUT: odata/Admin_Employee(5)
        public IHttpActionResult Put([FromODataUri] int key, Delta <Admin_Employee> patch)
        {
            Validate(patch.GetEntity());

            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            Admin_Employee admin_Employee = db.Admin_Employee.Find(key);

            if (admin_Employee == null)
            {
                return(NotFound());
            }

            patch.Put(admin_Employee);

            try
            {
                db.SaveChanges();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!Admin_EmployeeExists(key))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(Updated(admin_Employee));
        }