Exemplo n.º 1
0
        public List <ColumnAttribute> GetColumns(PropertyInfo member)
        {
            var equals = member.PropertyType.GetMethod(nameof(Equals), new[] { typeof(object) });

            if (equals == null || equals.DeclaringType == typeof(object))
            {
                throw PtixedException.MissingImplementation(member.PropertyType, nameof(Equals));
            }

            return(Table.Get(member.PropertyType)
                   .PhysicalColumns
                   .Select(x => new ColumnAttribute(x.Name)
            {
                IsAutoIncrement = x.IsAutoIncrement
            })
                   .ToList());
        }