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); }
public Package CreatePackage(Card[] cards) { return(_packageRepository.CreatePackage(cards)); }