Example #1
0
        private Seller Convert(SellerDto sellerDto, bool isUpdate)
        {
            var seller = new Seller()
            {
                Email            = sellerDto.Email,
                FIO              = sellerDto.FIO,
                PercentFromOrder = sellerDto.PercentFromOrder,
                Phone            = sellerDto.Phone
            };

            if (isUpdate)
            {
                seller.Id = sellerDto.Id;
            }
            return(seller);
        }
Example #2
0
 public void UpdateSeller(SellerDto sellerDto)
 {
     repositories.sellerRepository.Update(Convert(sellerDto, true));
 }
Example #3
0
 public void AddSeller(SellerDto sellerDto)
 {
     repositories.sellerRepository.Create(Convert(sellerDto, false));
 }