So I just found a Google "easter egg" you REALLY don't want to find...
-
Sander Rossel wrote:
I used the same C# property for two separate navigational properties in EF. Which "sort of" works, apparently. The exception really doesn't make sense though, as do the symptoms X|
Sounds like someone is using
ReferenceEquals
instead of an actual value comparison.Software Zen:
delete this;
Nah, I don't think I've ever seen ReferenceEquals in C# code, because why would you ever want to know that? The problem was more like:
someEntity.HasMany(x => x.FirstList).WithMany(x => x.OtherList).UsingEntity<...>(...)
someEntity.HasMany(x => x.SecondList).WithMany(x => x.OtherList).UsingEntity<...>(...)Changing that second line fixed the issue.
someEntity.HasMany(x => x.SecondList).WithMany(x => x.SecondOtherList).UsingEntity<...>(...)
Not an obvious error, compiles fine and everything.
Best, Sander Azure DevOps Succinctly (free eBook) Azure Serverless Succinctly (free eBook) Migrating Apps to the Cloud with Azure arrgh.js - Bringing LINQ to JavaScript
-
Nah, I don't think I've ever seen ReferenceEquals in C# code, because why would you ever want to know that? The problem was more like:
someEntity.HasMany(x => x.FirstList).WithMany(x => x.OtherList).UsingEntity<...>(...)
someEntity.HasMany(x => x.SecondList).WithMany(x => x.OtherList).UsingEntity<...>(...)Changing that second line fixed the issue.
someEntity.HasMany(x => x.SecondList).WithMany(x => x.SecondOtherList).UsingEntity<...>(...)
Not an obvious error, compiles fine and everything.
Best, Sander Azure DevOps Succinctly (free eBook) Azure Serverless Succinctly (free eBook) Migrating Apps to the Cloud with Azure arrgh.js - Bringing LINQ to JavaScript
Sander Rossel wrote:
I don't think I've ever seen
ReferenceEquals
in C# code, because why would you ever want to know that?I've used it a few times, mostly in collections and n-way tree structures to identify specific instances.
Software Zen:
delete this;
-
My someone else's code that I'm currenctly working on breaks with a NullReferenceException, except... The exception seems to have to do with lazy loading in entity framework. When I set a breakpoint and inspect some variables quickly enough they're null. After that the code stopped executing a few seconds and everything runs fine. When I don't set a breakpoint it breaks because some variable is null. When the code breaks and I inspect every variable in the block, nothing is null. Weird issue, I've never seen it before. So naturally, I google for "nullreferenceexception "FixupSkipNavigations"" (FixupSkipNavigations is where the exception occurs and I have little else to go by). Well, Google it for yourself... No results :(( I get a yeti who's ice fishing and catches a boot, an empty can, a can of sardines or a fish when you click it. THIS IS NOT HELPING X|
Best, Sander Azure DevOps Succinctly (free eBook) Azure Serverless Succinctly (free eBook) Migrating Apps to the Cloud with Azure arrgh.js - Bringing LINQ to JavaScript
My granddaughter (1 year old) got a hold of my laptop and "typed" some gibberish which happened to be on a new Chrome tab and she got the Yeti. Cute when you aren't trying to find something for work.
I’ve given up trying to be calm. However, I am open to feeling slightly less agitated.