using (var ctx = new EntityContext())
{
var tmpTimeout = ctx.CommandTimeout;
try
{
ctx.CommandTimeout = int.MaxValue;
ctx.YOUROBJECTS.DeleteObject(value));
ctx.SaveChanges();
}
catch (Exception ex)
{}
finally
{
ctx.CommandTimeout = tmpTimeout;
}
}
No comments:
Post a Comment