public FieldViewModel Build(Field field)
 {
     return new FieldViewModel()
       {
     Id = field.Id,
     Name = this.handler.Storage.GetRepository<ILocalizationRepository>().FilteredByDictionaryId(field.NameId).First().Value,
     FieldOptions = this.handler.Storage.GetRepository<IFieldOptionRepository>().FilteredByFieldId(field.Id).Select(
       fo => new FieldOptionViewModelBuilder(this.handler).Build(fo)
     )
       };
 }
 public FieldViewModel Build(Field field)
 {
     return new FieldViewModel()
       {
     Id = field.Id,
     FieldType = new FieldTypeViewModelBuilder(this.handler).Build(this.handler.Storage.GetRepository<IFieldTypeRepository>().WithKey(field.FieldTypeId)),
     Name = this.GetObjectLocalizationValue(field.NameId),
     FieldOptions = this.handler.Storage.GetRepository<IFieldOptionRepository>().FilteredByFieldId(field.Id).Select(
       fi => new FieldOptionViewModelBuilder(this.handler).Build(fi)
     )
       };
 }
Exemplo n.º 3
0
 private Form GetForm(Field field)
 {
     return this.Storage.GetRepository<IFormRepository>().WithKey(field.FormId);
 }
Exemplo n.º 4
0
 private void CacheForm(Field field)
 {
     new CacheManager(this).CacheForm(this.GetForm(field));
 }