예제 #1
0
        private static compositeid GetCompositeIDWithProperties(ITable table, Entity entity)
        {
            compositeid cId = new compositeid();
            foreach (var property in entity.Key.Properties)
            {
                IColumn mappedColumn = property.MappedColumn();
                if (mappedColumn == null)
                    continue;

                cId.AddKeyProperty(new keyproperty
                                    {
                                        column1 = mappedColumn.Name.BackTick(),
                                        name = property.Name
                                    });
            }
            return cId;
        }
예제 #2
0
        private static compositeid GetCompositeIDWithComponent(Component component)
        {
            compositeid cId = new compositeid();
            cId.@class = component.Specification.Name;
            cId.name = component.Name;

            foreach (var property in component.Properties)
            {
                IColumn mappedColumn = property.MappedColumn();
                if (mappedColumn == null)
                    continue;

                cId.AddKeyProperty(new keyproperty
                {
                    column1 = mappedColumn.Name.BackTick(),
                    name = property.PropertyName
                });
            }
            return cId;
        }