Hi all,
Not sure if anyone encountered ArgumentNullException being thrown if you pass in an empty list to EntityManager.SaveChanges(emptyList) and then try to handle an EntityManager Saved event.
I now have to try...catch accessing e.Entities :(
private static void EntityManager_Saved(object sender, EntitySavedEventArgs e)
{
if (e == null || e.Error != null)
return;
IList<object> ents = null;
try
{
ents = e.Entities;
}
catch (ArgumentNullException)
{
// what happened ???
}
if (ents == null || ents.FirstOrDefault() == null)
return;
...
}