Skip to content

ExpandoObject exceptions during Rebus.SqlServer initialization #112

@ADD-David-Antolin

Description

@ADD-David-Antolin

When Rebus.SqlServer is initialized, the following exception occurs in background (although it does not stop the initialization).

Microsoft.CSharp.RuntimeBinder.BinderException:
''System.Dynamic.ExpandoObject' does not contain a definition for 'TABLE_SCHEMA''

followed by

Microsoft.CSharp.RuntimeBinder.BinderException:
''System.Dynamic.ExpandoObject' does not contain a definition for 'TABLE_NAME''

The error is produced here:
https://github.com/rebus-org/Rebus.SqlServer/blob/master/Rebus.SqlServer/SqlServer/SqlServerMagic.cs#L31

I think the use of dynamic and ExpandoObject is unnecessary here:

https://github.com/rebus-org/Rebus.SqlServer/blob/master/Rebus.SqlServer/SqlServer/SqlServerMagic.cs#L104-L108

and can be substituted with a Dictionary<string, string>.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions