DEV Community

Discussion on: C# and .NET Core Appreciation Post. The most beautiful piece of code I have ever seen... this month!

 
sduduzog profile image
Sdu

Ok, this actually looks cleaner and more concise. I'm assuming from this that the virtual property relation to users is setup automatically because both entities exist in one context. I'm puzzled by how this really works

Thread Thread
 
sduduzog profile image
Sdu

Here's another strange thing I'm picking up from this snippet, the fact that the property name and its type can just be exactly the same without C# complaining. I've been experimenting areas where such is possible. public virtual Token Token;