积极答复者
请教 EF 里面执行事务和存储过程的问题

问题
-
在EF里面有下面的场景,有什么好的办法实现呢?
用EF里面的 MyEntitys entity=new MyEntitys ();
entity.AddToSys_Application(item);
entity.SaveChanges();下面想执行 t-sql里面的存储过程
2个语句一起执行用事务怎么弄呢,还有怎么用EntityCommand去执行t-sql语句呢?
除了下面的 TransactionScope 有没好的办法?
using (TransactionScope tran = new TransactionScope())
{
try
{
db.DeleteObject((from c in db.Customers
where c.CustomerID == "QUICK"
select c).AsEnumerable().First());
db.SaveChanges(true);}