public Field Create(Infrastructure.Data.Field dataField, Form form) { if (dataField == null) return null; return new Field { Id = dataField.Id, FieldId = dataField.FieldId, Form = form, Value = dataField.Value, Data = dataField.Data, FieldName = dataField.FieldName }; }
internal Form Create(Infrastructure.Data.Form dataForm) { Form form = new Form(dataForm.Timestamp) { Id = dataForm.Id, FormItemId = dataForm.FormItemId, InteractionId = dataForm.SessionId, Data = dataForm.Data }; List<Field> fields = new List<Field>(); foreach (Infrastructure.Data.Field dataField in dataForm.Fields) { Field field = _fieldFactory.Create(dataField, form); if (field != null) fields.Add(field); } form.Field = fields; return form; }