コード例 #1
0
 /// <summary>
 /// Adds the specified instance.
 /// </summary>
 /// <param name="instance">The instance.</param>
 public void Add(UploadImage instance)
 {
     using (ImageCropEntities db = new ImageCropEntities())
     {
         db.UploadImage.AddObject(instance);
         db.SaveChanges();
     }
 }
コード例 #2
0
        /// <summary>
        /// 建立新 UploadImage 物件。
        /// </summary>
        /// <param name="id">ID 屬性的初始值。</param>
        /// <param name="originalImage">OriginalImage 屬性的初始值。</param>
        /// <param name="createDate">CreateDate 屬性的初始值。</param>
        public static UploadImage CreateUploadImage(global::System.Guid id, global::System.String originalImage, global::System.DateTime createDate)
        {
            UploadImage uploadImage = new UploadImage();

            uploadImage.ID            = id;
            uploadImage.OriginalImage = originalImage;
            uploadImage.CreateDate    = createDate;
            return(uploadImage);
        }
コード例 #3
0
 /// <summary>
 /// 將新物件加入 UploadImage EntitySet 的方法已被取代。請考慮改為使用關聯的 ObjectSet&lt;T&gt; 屬性的 .Add 方法。
 /// </summary>
 public void AddToUploadImage(UploadImage uploadImage)
 {
     base.AddObject("UploadImage", uploadImage);
 }