EntitySet<T>'s IList.Add implementation does not have consistent effects - by Marc Gravell

Status : 

  Won't Fix<br /><br />
		Due to several factors the product team decided to focus its efforts on other items.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.


7
0
Sign in
to vote
ID 671989 Comments
Status Closed Workarounds
Type Bug Repros 1
Opened 5/31/2011 10:35:40 PM
Access Restriction Public
Moderator Decision Sent to Engineering Team for consideration

Description

In short, *when accessed via IList.Add*, the behaviour is not consistent with the IList<T>.Add or EntitySet<T>.Add APIs, re both events raised and side effects (most notably, HasLoadedOrAssignedValues).

THIS CAN CAUSE DATA LOSS DURING SERIALIZATION, since HasLoadedOrAssignedValues is used by the boilerplate code to decide whether or not to write data.

Affects .NET 3.5 and .NET 4.0

See http://stackoverflow.com/questions/6194639/entityset-is-there-a-sane-reason-that-ilist-add-doesnt-set-assigned

Also noted previolusly: http://social.msdn.microsoft.com/forums/en-US/linqprojectgeneral/thread/5ae5e5f5-bef5-4a63-aadc-98ed8b30c8d1/
Sign in to post a comment.
Posted by Marc Gravell on 7/11/2011 at 11:16 AM
Sigh. I expected nothing different, yet only through years of the same.

Here's the thing. You have many many users out there that *do* use LINQ-to-SQL. They *like* LINQ-to-SQL, and it does what they need. And does it reasonably well. Just because MS have a new pet data framework, that doesn't magically make everyone find the budget to switch over to EF, or even have the *desire* to switch over to EF. Quite the opposite - it has its own quirks, enough that if I need to move my data, it'll be in the opposite direction, to things like "dapper".

MS seem to regret releasing LINQ-to-SQL; well frankly, tough - you *did* release it, and burying it along with any outstanding bugs reflects poorly on MS and it's attitude towards its customers, and makes a mockery of the stated support cycles. Poor show, Microsoft. Poor show.
Posted by Microsoft on 7/11/2011 at 10:45 AM
Hi Marc,

Thanks for taking the time to file this issue. At this point we do not have any plans to change the behavior of EntitySet<T>.Add for LINQ to SQL. Going forward we will be investing heavily in the Entity Framework.

Regards,

L2S Team
Posted by MS-Moderator08 [Feedback Moderator] on 6/1/2011 at 2:38 AM
Thank you for reporting the issue.
We are routing this issue to the appropriate group within the Visual Studio Product Team for triage and resolution.These specialized experts will follow-up with your issue.
Posted by MS-Moderator01 on 5/31/2011 at 10:49 PM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)