Пример #1
0
        void IPortfolioDataSource.AddPicture(Picture picture)
        {
            if (picture.PictureId != 0)
            {
                var entry = Pictures.Find(picture.PictureId);
                Entry <Picture>(entry).CurrentValues.SetValues(picture);

                SaveChanges();
                return;
            }

            Pictures.Add(picture);
            SaveChanges();
        }