// PUT api/AppUser/5
        public HttpResponseMessage PutAppUser(Guid id, AppUser appuser)
        {
            if (!ModelState.IsValid)
            {
                return Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState);
            }

            if (id != appuser.AppUserId)
            {
                return Request.CreateResponse(HttpStatusCode.BadRequest);
            }

            db.Entry(appuser).State = EntityState.Modified;

            try
            {
                db.SaveChanges();
            }
            catch (DbUpdateConcurrencyException ex)
            {
                return Request.CreateErrorResponse(HttpStatusCode.NotFound, ex);
            }

            return Request.CreateResponse(HttpStatusCode.OK);
        }
        // POST api/AppUser
        public HttpResponseMessage PostAppUser(AppUser appuser)
        {
            if (ModelState.IsValid)
            {
                db.AppUsers.Add(appuser);
                db.SaveChanges();

                HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.Created, appuser);
                response.Headers.Location = new Uri(Url.Link("DefaultApi", new { id = appuser.AppUserId }));
                return response;
            }
            else
            {
                return Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState);
            }
        }