public bool EditPointValue(PointValueEdit model)
        {
            using (var ctx = new ApplicationDbContext())
            {
                var entity =
                    ctx
                    .PointValues
                    .Single(e => e.PointValueId == model.PointValueId);

                entity.CharacterId       = model.CharacterId;
                entity.EpisodeAppearance = model.EpisodeAppearance;
                entity.SurvivedEpisode   = model.SurvivedEpisode;
                entity.GetKill           = model.GetKill;
                entity.Death             = model.Death;
                entity.BigKill           = model.BigKill;

                return(ctx.SaveChanges() == 1);
            }
        }
        public IHttpActionResult Put(PointValueEdit pointValue)
        {
            if (User.IsInRole("SuperAdmin"))
            {
                if (!ModelState.IsValid)
                {
                    return(BadRequest(ModelState));
                }

                var service = new PointValueService(Guid.Parse(User.Identity.GetUserId()));

                if (!service.EditPointValue(pointValue))
                {
                    return(InternalServerError());
                }

                return(Ok());
            }
            return(BadRequest());
        }