public void Post(int id, [FromBody] SaveReputationRequest request)
 {
     try {
         var reputation = _repository.Reputations.SingleOrDefault(r => r.Id == id);
         reputation.Name            = request.Name;
         reputation.Type            = GetReputationType(request.ReputationType);
         reputation.CommentRequired = request.CommentRequired;
         reputation.OrderSequence   = request.OrderSequence;
         _repository.SetModified(reputation);
         _repository.SaveChanges();
     } catch (Exception e) {
         LogUtils.Error("Failed to save reputation", e);
         throw e;
     }
 }
 public void Put([FromBody] SaveReputationRequest request)
 {
     try {
         var nextOrderSequence = _repository.Reputations.Where(r => (int)r.Type == request.ReputationType).Max(r => r.OrderSequence) + 1;
         _repository.Add(new Database.Domain.Reputation()
         {
             Name            = request.Name,
             Type            = GetReputationType(request.ReputationType),
             CommentRequired = request.CommentRequired,
             OrderSequence   = nextOrderSequence
         });
         _repository.SaveChanges();
     } catch (Exception e) {
         LogUtils.Error("Failed to add reputation", e);
         throw e;
     }
 }