/// <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(); } }
/// <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); }
/// <summary> /// 將新物件加入 UploadImage EntitySet 的方法已被取代。請考慮改為使用關聯的 ObjectSet<T> 屬性的 .Add 方法。 /// </summary> public void AddToUploadImage(UploadImage uploadImage) { base.AddObject("UploadImage", uploadImage); }