public JsonResult<ResponseViewModel<bool>> PostGameFeatures(GameFeatureViewModel[] gameFeatures)
 {
     var response =
         ServiceExecutor.Execute(() => _gameFeatureManagementService.PutGameFeatures(gameFeatures));
     return Json(response);
 }
 public bool PutGameFeatures(GameFeatureViewModel[] gameFeatures)
 {
     gameFeatures.ToList().ForEach(InsertGameFeature);
     RepositoryFactory.Context.SaveChanges();
     return true;
 }
 private void InsertGameFeature(GameFeatureViewModel gameFeature)
 {
     var entity =
         RepositoryFactory.Context.GameFeatureLanguages.FirstOrDefault(
             x => x.GameFeature.Id == gameFeature.Id && x.Language.Id == gameFeature.LanguageId);
     if (entity == null)
         throw new Exception(ThrowMessage.GameFeatureNotExists.ToString());
     entity.GameFeatureName = gameFeature.GameFeatureName;
 }
 public bool PutGameFeature(GameFeatureViewModel gameFeature)
 {
     InsertGameFeature(gameFeature);
     RepositoryFactory.Context.SaveChanges();
     return true;
 }