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

            db.Lkup_User_Roles.Add(lkup_User_Roles);
            db.SaveChanges();

            return(Created(lkup_User_Roles));
        }
        // DELETE: odata/Lkup_User_Roles(5)
        public IHttpActionResult Delete([FromODataUri] decimal key)
        {
            Lkup_User_Roles lkup_User_Roles = db.Lkup_User_Roles.Find(key);

            lkup_User_Roles.ACTIVE = "N";
            if (lkup_User_Roles == null)
            {
                return(NotFound());
            }

            db.Entry(lkup_User_Roles).State = EntityState.Modified;
            //db.Lkup_User_Roles.Remove(lkup_User_Roles);
            db.SaveChanges();

            return(StatusCode(HttpStatusCode.NoContent));
        }
        public IHttpActionResult Patch([FromODataUri] decimal key, Delta <Lkup_User_Roles> patch)
        {
            Validate(patch.GetEntity());

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

            Lkup_User_Roles lkup_User_Roles = db.Lkup_User_Roles.Find(key);

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

            patch.Patch(lkup_User_Roles);

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

            return(Updated(lkup_User_Roles));
        }