Пример #1
0
        public void InsertWatch(Models.Watch watch, byte[] mainImage, List <byte[]> images)
        {
            watch.MainImagePath = Utility.Image.Save(mainImage);

            foreach (byte[] img in images)
            {
                watch.Images.Add(new Image
                {
                    Path = Utility.Image.Save(mainImage)
                });
            }

            watchRepository.Insert(watch);
            unitOfWork.Commit();
        }