private void CreateLocalizations(PropertyInfo propertyInfo, LocalizationSet localizationSet) { ICultureRepository cultureRepository = this.HttpContext.RequestServices.GetService <ICultureRepository>(); ILocalizationRepository localizationRepository = this.HttpContext.RequestServices.GetService <ILocalizationRepository>(); Storage storage = this.HttpContext.RequestServices.GetService <Storage>(); foreach (Culture culture in cultureRepository.GetAll()) { Localization localization = new Localization(); localization.LocalizationSetId = localizationSet.Id; localization.CultureCode = culture.Code; localization.Value = this.Request.Form[propertyInfo.Name + culture.Code]; localizationRepository.Create(localization); } storage.SaveChanges(); }