public void CreateWithOneToManyRelationship() { IBaseEntity stringType = entityContext.ProxySet <IAttributeType>("AttributeType") .Single(attr => attr.ClrName == "System.String"); IBaseEntity entity = entityContext.Create("Entity"); entity.SetAttributeValue("Name", nameof(CreateWithManyToOneRelationship)); IBaseEntity attribute = entityContext.Create("Attribute"); attribute.SetAttributeValue("Name", "Attribute_" + nameof(CreateWithManyToOneRelationship)); entity.AddMemberToRelationship("Attributes", attribute); entityContext.Set("Entity").Add(entity); entityContext.SaveChanges(); }