Пример #1
0
        public void AddOrChangePhoto(Image newImage)
        {
            ProductPhoto p = (from obj in ProductProductPhoto
                              select obj.ProductPhoto).FirstOrDefault();

            p.LargePhoto         = newImage.GetResourceAsByteArray();
            p.LargePhotoFileName = newImage.Name;
        }
 /// <summary>
 /// Create a new ProductPhoto object.
 /// </summary>
 /// <param name="productPhotoID">Initial value of the ProductPhotoID property.</param>
 /// <param name="modifiedDate">Initial value of the ModifiedDate property.</param>
 public static ProductPhoto CreateProductPhoto(global::System.Int32 productPhotoID, global::System.DateTime modifiedDate)
 {
     ProductPhoto productPhoto = new ProductPhoto();
     productPhoto.ProductPhotoID = productPhotoID;
     productPhoto.ModifiedDate = modifiedDate;
     return productPhoto;
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the ProductPhotoes EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToProductPhotoes(ProductPhoto productPhoto)
 {
     base.AddObject("ProductPhotoes", productPhoto);
 }
Пример #4
0
 public static ProductPhoto Updating(this ProductPhoto x, [Injected] DateTime now) => x with