Beispiel #1
0
        public BasketBTO UpdateBasket(BasketBTO basketBto)
        {
            BasketDTO basket;

            if (basketBto != null)
            {
                basket = basketRepository.Update(basketBto.BTOToBasketDomain().BasketDomainToDTO());
                return(basket?.DTOToBasketDomain().BasketDomainToBTO() ?? null);
            }
            return(null);
        }
Beispiel #2
0
        public BasketBTO AddBasket(BasketBTO basketBto)
        {
            BasketDTO meal = new BasketDTO();

            if (basketBto != null)
            {
                var domain = basketBto.BTOToBasketDomain();
                meal = basketRepository.Create(domain.BasketDomainToDTO());
                return(meal.DTOToBasketDomain().BasketDomainToBTO());
            }
            return(null);
        }