Esempio n. 1
0
        private List <ColumnInformation> GetColumnInformation()
        {
            var columns = new List <ColumnInformation>();

            foreach (PropertyInfo propertyInfo in _type.GetProperties())
            {
                var attribute = Attributes.GetAttribute <UserDefinedTableTypeColumnAttribute>(propertyInfo);

                if (attribute != null)
                {
                    var column = new ColumnInformation();
                    column.Name     = attribute.Name ?? propertyInfo.Name;
                    column.Property = propertyInfo;
                    column.Order    = attribute.Order;

                    columns.Add(column);
                }
            }

            return(columns.OrderBy(info => info.Order).ToList());
        }
        private List<ColumnInformation> GetColumnInformation()
        {
            var columns = new List<ColumnInformation>();

            foreach (PropertyInfo propertyInfo in _type.GetProperties())
            {
                var attribute = Attributes.GetAttribute<UserDefinedTableTypeColumnAttribute>(propertyInfo);

                if (attribute != null)
                {
                    var column = new ColumnInformation();
                    column.Name = attribute.Name ?? propertyInfo.Name;
                    column.Property = propertyInfo;
                    column.Order = attribute.Order;

                    columns.Add(column);
                }
            }

            return columns.OrderBy(info => info.Order).ToList();

        }