Пример #1
0
        public static void ExcluirProdutos()
        {
            using (var repo = new ProdutoDAOEntity())
            {
                IList <Produto> produtos = repo.Produtos();

                foreach (var item in produtos)
                {
                    repo.Remove(item);
                }
                repo.SaveChanges();
            }
        }