Ejemplo n.º 1
0
        public static void Delete(TEntity entity, bool submitChanges)
        {
            #region Validation
            if (entity == null)
            {
                throw new ArgumentNullException("entity");
            }
            #endregion

            TEntity delete = GetEntity(entity);

            EntityTable.DeleteOnSubmit(delete);

            if (submitChanges)
            {
                DataContext.SubmitChanges();
            }
        }