JNode IJsonSerializable.ToJNode(Object config) { var jo = new JNode(); jo.AddPrimitive("name", this.Name); jo.AddPrimitive("entityTypeName", this.EntityType.Name); jo.AddPrimitive("isScalar", this.IsScalar); jo.AddPrimitive("associationName", this.AssociationName); jo.AddArray("validators", this.Validators); jo.AddArray("foreignKeyNames", this.ForeignKeyNames); jo.AddArray("invForeignKeyNames", this.InvForeignKeyNames); // jo.Add("custom", this.Custom.ToJObject) return(jo); }
JNode IJsonSerializable.ToJNode(Object config) { lock (_structuralTypes) { var jo = new JNode(); jo.AddPrimitive("metadataVersion", MetadataVersion); // jo.Add("name", this.Name); jo.AddPrimitive("namingConvention", this.NamingConvention.Name); // jo.AddProperty("localQueryComparisonOptions", this.LocalQueryComparisonOptions); jo.AddArray("dataServices", this._dataServiceMap.Values); jo.AddArray("structuralTypes", this._structuralTypes); jo.AddMap("resourceEntityTypeMap", this._resourceNameEntityTypeMap.ToDictionary(kvp => kvp.Key, kvp => kvp.Value.Name)); return(jo); } }
JNode IJsonSerializable.ToJNode(Object config) { var jo = new JNode(); jo.AddPrimitive("shortName", this.ShortName); jo.AddPrimitive("namespace", this.Namespace); jo.AddPrimitive("baseTypeName", this.BaseEntityTypeName); jo.AddPrimitive("isAbstract", this.IsAbstract, false); jo.AddPrimitive("autoGeneratedKeyType", this.AutoGeneratedKeyType.ToString()); jo.AddPrimitive("defaultResourceName", this.DefaultResourceName); jo.AddArray("dataProperties", this.DataProperties.Where(dp => dp.IsInherited == false)); jo.AddArray("navigationProperties", this.NavigationProperties.Where(np => np.IsInherited == false)); jo.AddArray("validators", this.Validators); // jo.AddProperty("custom", this.Custom.ToJObject) return(jo); }
private JNode PrepareSaveBundle(IEnumerable <IEntity> entitiesToSave, SaveOptions saveOptions) { var jn = new JNode(); jn.AddArray("entities", entitiesToSave.Select(e => EntityToJNode(e))); jn.AddJNode("saveOptions", saveOptions); return(jn); }
JNode IJsonSerializable.ToJNode(object config) { var jn = new JNode(); jn.AddPrimitive("entityType", this.EntityType.Name); jn.AddArray("values", this.Values); return(jn); }
JNode IJsonSerializable.ToJNode(Object config) { var jo = new JNode(); jo.AddPrimitive("shortName", this.ShortName); jo.AddPrimitive("namespace", this.Namespace); jo.AddPrimitive("isComplexType", true); // jo.AddProperty("baseTypeName", this.BaseTypeName); // jo.AddProperty("isAbstract", this.IsAbstract, false); jo.AddArray("dataProperties", this.DataProperties.Where(dp => dp.IsInherited == false)); // jo.AddArrayProperty("validators", this.Validators); // jo.AddProperty("custom", this.Custom.ToJObject) return(jo); }
JNode IJsonSerializable.ToJNode(Object config) { var jn = new JNode(); jn.AddPrimitive("name", this.Name); jn.AddPrimitive("dataType", this.DataType != null ? this.DataType.Name : null); jn.AddPrimitive("complexTypeName", this.ComplexType != null ? this.ComplexType.Name : null); jn.AddPrimitive("isNullable", this.IsNullable, true); jn.AddPrimitive("defaultValue", this.DefaultValue); jn.AddPrimitive("isPartOfKey", this.IsPartOfKey, false); jn.AddPrimitive("isUnmapped", this.IsUnmapped, false); jn.AddPrimitive("isAutoIncrementing", this.IsAutoIncrementing, false); jn.AddPrimitive("concurrencyMode", this.ConcurrencyMode == ConcurrencyMode.None ? null : this.ConcurrencyMode.ToString()); jn.AddPrimitive("maxLength", this.MaxLength); jn.AddPrimitive("isScalar", this.IsScalar, true); jn.AddArray("validators", this.Validators); jn.AddPrimitive("enumType", this.EnumTypeName); // jo.AddProperty("custom", this.Custom.ToJObject) return(jn); }