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

Using new on Entity Model Property Throws Exception Error #228

Open
herbertmilhomme opened this issue Apr 30, 2021 · 0 comments
Open

Using new on Entity Model Property Throws Exception Error #228

herbertmilhomme opened this issue Apr 30, 2021 · 0 comments

Comments

@herbertmilhomme
Copy link

Base class is an abstract... the property is nullable (int?)...
I inherit the base, and use new public int to change type from nullable to a must have property (also interface that's used on class requires property to not be null).

when i execute code, i get error because the property is being detected twice in array/foreach loop and isnt considered one and the same (like most references typically are).

What are my solutions? should i remove the exception error from source, or is there another work around that's better that doesnt involve disregarding code smells?

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

1 participant