Пример #1
0
        public IHttpActionResult RemoveAllMagazineProducts()
        {
            using (var repository = new MagazineRepository())
            {
                var products = repository.GetAll();

                foreach (var product in products)
                {
                    if (repository.RemoveAll() == false)
                    {
                        return(BadRequest());
                    }
                }
            }

            return(Ok());
        }