monitor-table-change-with-sqltabledependency icon indicating copy to clipboard operation
monitor-table-change-with-sqltabledependency copied to clipboard

Using `new` on Entity Model Property Throws Exception Error

Open herbertmilhomme opened this issue 3 years ago • 0 comments

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?

herbertmilhomme avatar Apr 30 '21 15:04 herbertmilhomme