Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't compile in .NET Core 3.1 #1

Open
dlipsy opened this issue Aug 6, 2020 · 1 comment
Open

Doesn't compile in .NET Core 3.1 #1

dlipsy opened this issue Aug 6, 2020 · 1 comment

Comments

@dlipsy
Copy link

dlipsy commented Aug 6, 2020

Thx for posting this utility/tool! Just had one issue when trying to use it...getting compile error with this source code.
It looks like you may be missing the code for the extension method GetElementsResult()?

@hexpl0it
Copy link

you can replace this line
KeyValuePair<PropertyInfo, DataMemberAttribute>[] pairs = typeof(TEntity).GetElementsResult().ToArray();
with this
KeyValuePair<PropertyInfo, DataMemberAttribute>[] pairs = typeof(TEntity).GetProperties().Select(x => new KeyValuePair<PropertyInfo, DataMemberAttribute>(x, (DataMemberAttribute)x.GetCustomAttribute(typeof(DataMemberAttribute)))).ToArray();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants