Пример #1
0
        /// <summary>
        /// Add a pizza store restaurant.
        /// </summary>
        /// <param name="restaurant">The restaurant object</param>
        public void AddStore(PizzaStore restaurant)
        {
            Location store = Mapper.Map(restaurant);

            if (locationRepo.GetTById(store.Id) != null)
            {
                throw new InvalidOperationException($"Pizza Store with ID {store.Id} already exists.");
            }
            locationRepo.AddT(store);
        }