Exemplo n.º 1
0
        public void AddNewPackage(AddNewPackageViewModel newPackage)
        {
            var package = PreparePackageModel(newPackage);

            if (newPackage.DayDescriptions.Count > 0)
            {
                package.DayDescriptions = newPackage.DayDescriptions;
            }

            foreach (var packageImage in newPackage.OtherPictures.Select(picture => new PackageImage {
                ImageSource = picture
            }))
            {
                package.PackageImages.Add(packageImage);
            }
            _packageRepository.CreatePackage(package);
        }
Exemplo n.º 2
0
 public Package CreatePackage(Card[] cards)
 {
     return(_packageRepository.CreatePackage(cards));
 }