This project is read-only.


Document DbContext.SaveChanges exceptions [FixedIn6.1.0-alpha1] [AffectedLastRTM]


The doc comments for DbContext.SaveChanges() should indicate that the DbUpdateConcurrencyException exception could be thrown.

It may also be worth documenting other exceptions too.
Closed Dec 4, 2013 at 5:11 PM by mgirgin


RoMiller wrote Nov 29, 2012 at 11:41 PM

EF Team Triage: Low priority but very simple, we should do it in EF6.

RoMiller wrote Jan 16, 2013 at 8:51 PM

This is small, we should push to get it into EF6.

RandRandom wrote Oct 4, 2013 at 12:28 PM

To bad this is for EF 6.1.0... :(
Currently trying to catch all possible exceptions with EF 5, and yeah the intellisense is no help only telling me about "InvalidOperationException"....

ajcvickers wrote Dec 2, 2013 at 6:05 PM

Fixed in 1b7f3afcbb60

Thanksgiving leftovers... (Fixes for several small bugs)

These are bugs that are quite simple to fix but are mostly low priority such that they generally get triaged out of releases. Better exception message when AcceptChanges encounters a key conflict
◾This is about putting entity type names in the message so I also did it for common Attach and ReferentialConstraint violation cases. Simplify exception message for connection failures
◾Note that the bug implies that we know that the reason for the failure is a connection failure. In fact all we know if that some method on the provider threw and exception. I updated the message to be clearer without being wrong. If we want to do something more complicated then it will have to be triaged as a separate item.
◾I will get a forward link to UpForGrabs: Remove "class" generic constraint from Include extension method
◾Done Document DbContext.SaveChanges exceptions
◾Done Key ordering unspecified exception could be more helpful
◾Per note on bug, just added forward links to documentation
◾Will get links for and Change DbMigrationsConfiguration.Seed Description
◾Done Doc: IRelated.IsLoaded XML documentation is not up-to-date
◾Done Doc: EntityConnection.State XML documentation wrong
◾Done Make migrations configuration options such as AutomaticDataLossAllowed more discoverable
◾Updated the error message as suggested in the bug Consider making SqlSpatialServices public
◾Done Consider making InitializeDatabase methods virtual in all initializers
◾Done ObjectItemCollection doesn't seem to need [CLSCompliant(false)]
◾Removed all CLSCompiant(false) attributes and then added back only those that the compiler indicates are needed Three lines of dead code in InputForComputingCellGroups
◾Removed GenerateViews throws Sequence contains no matching element for incorrect container names
◾Added exception messages for this and also for hash calculation. Also added messages for single container methods when there is more than one container.
◾Updated tests to actually check the exception messages. Documentation :: misleading method description for DbModelBuilder.Types
◾Done Fix typos in code base
◾Done Consider converting debug methods from ObjectStateManager into functional tests
◾Both methods looked like they could be potentially useful if somebody makes changes in this area. Therefore, instead of removing them I added some checks that should avoid them being too slow when there are lots of entities but still provide value when running small tests such as the ones we have in the test suite. Assert followed by surprising exception when an EntityConnection and its underlying connection go out of sync
◾Changed assert into exception as suggested in bug. Documentation error or bug in HasDatabaseGeneratedOption method