public PropertyViewModel Build(Property property)
 {
     return new PropertyViewModel()
       {
     MemberCode = this.handler.Storage.GetRepository<IMemberRepository>().WithKey(property.MemberId).Code,
     Html = this.GetObjectLocalizationValue(property.HtmlId)
       };
 }
        public PropertyViewModel Build(Property property)
        {
            //Member member = this.controller.Storage.GetRepository<IMemberRepository>().WithKey(property.MemberId);

              //ModelState modelState;

              //if (this.controller.ModelState.TryGetValue(string.Format("property{0}{1}", property.Id, "en"), out modelState) && modelState.Value != null)
              //  ;

              return new PropertyViewModel()
              {
            Id = property.Id,
            HtmlLocalizations = this.GetLocalizations(
              this.handler.Storage.GetRepository<IDictionaryRepository>().WithKey(property.HtmlId)
            )
              };
        }
        private void CreateProperty(Object @object, int memberId, string cultureCode, string value)
        {
            Property property = this.Storage.GetRepository<IPropertyRepository>().WithObjectIdAndMemberId(@object.Id, memberId);

              if (property == null)
              {
            Dictionary html = new Dictionary();

            this.Storage.GetRepository<IDictionaryRepository>().Create(html);
            this.Storage.Save();
            property = new Property();
            property.ObjectId = @object.Id;
            property.MemberId = memberId;
            property.HtmlId = html.Id;
            this.Storage.GetRepository<IPropertyRepository>().Create(property);
            this.Storage.Save();
              }

              Localization localization = new Localization();

              localization.DictionaryId = property.HtmlId;
              localization.CultureId = this.Storage.GetRepository<ICultureRepository>().WithCode(cultureCode).Id;
              localization.Value = value;
              this.Storage.GetRepository<ILocalizationRepository>().Create(localization);
        }