Skip to content

Implement casting to fully qualified type #652

@StefH

Description

@StefH
namespace X
{
    internal class Program
    {
        [DynamicLinqType]
        public enum ExampleEnum
        {
            Value1,
            Value2,
        };

        private static readonly ParsingConfig DefaultParsingConfig = new() { 
        };

        static void Main(string[] args)
        {
            var data = new[]
            {
                new { Value = ExampleEnum.Value1 },
                new { Value = ExampleEnum.Value2 },
            };

            // This should work:
            data.AsQueryable().Select(DefaultParsingConfig, $"\"{typeof(ExampleEnum).FullName}\"?(Value)");  

        }
    }
}

Related: #643

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions