public FieldOptionViewModel Build(FieldOption fieldOption)
 {
     return new FieldOptionViewModel()
       {
     Value = this.GetObjectLocalizationValue(fieldOption.ValueId)
       };
 }
        public FieldOption Map(CreateOrEditViewModel createOrEdit)
        {
            FieldOption fieldOption = new FieldOption();

              if (createOrEdit.Id != null)
            fieldOption = this.handler.Storage.GetRepository<IFieldOptionRepository>().WithKey((int)createOrEdit.Id);

              else fieldOption.FieldId = createOrEdit.FieldId;

              fieldOption.Position = createOrEdit.Position;
              return fieldOption;
        }
        private Form GetForm(FieldOption fieldOption)
        {
            Field field = this.Storage.GetRepository<IFieldRepository>().WithKey(fieldOption.FieldId);

              return this.Storage.GetRepository<IFormRepository>().WithKey(field.FormId);
        }
 private void CacheForm(FieldOption fieldOption)
 {
     new CacheManager(this).CacheForm(this.GetForm(fieldOption));
 }