Esempio n. 1
0
        public virtual void Delete(List <T> Obj)
        {
            UserEngine.SessionTimeOut();
            T NewObj = default(T);

            System.Data.Linq.ITable Table = null;
            for (int i = 0; i < Obj.Count; i++)
            {
                if (i == 0)
                {
                    Table = Standard.GetTable(Obj[i].GetType());
                }
                if (Table.GetOriginalEntityState(Obj[i]) == null)
                {
                    NewObj = Detach(Obj[i]);
                    Table.Attach(NewObj);
                    Table.DeleteOnSubmit(NewObj);
                }
                else
                {
                    Table.DeleteOnSubmit(Obj[i]);
                }
            }
        }