Error al usar TransactionScope en EF4 y SQL Compact 4
using (TransactionScope scope = new TransactionScope())
using (var context = new dwfEntities())
{
var field = (from x in context.DynFields where x.Id == id select x).First();
//delete defaults
foreach (var item in from x in context.DynFieldDefaults where x.DynField_Id == id select x)
{
context.DeleteObject(item);
}
context.SaveChanges();
//delete field
context.DeleteObject(field);
context.SaveChanges();
//commit
scope.Complete();
}
El código arroja "El objeto de conexión no se puede incluir en el alcance de la transacción"
¿SQL CE 4 admite TransactionScope? si no, ¿hay alguna solución para poder eliminar objetos de forma segura?