Clearing a Table

suggest making it a little better to make sure that everything is in a scope… here is another version that should work:

using (var x = Ice.IceDataContext.CreateDefaultTransactionScope()){
    foreach (var ud15 in Db.UD15)    {
        Db.DeleteObject(ud15);
    }
    Db.Validate();
    x.Complete();
}
1 Like