/// <summary> /// 用于向 Photo EntitySet 添加新对象的方法,已弃用。请考虑改用关联的 ObjectSet<T> 属性的 .Add 方法。 /// </summary> public void AddToPhoto(Photo photo) { base.AddObject("Photo", photo); }
/// <summary> /// 创建新的 Photo 对象。 /// </summary> /// <param name="photoId">PhotoId 属性的初始值。</param> /// <param name="path">Path 属性的初始值。</param> /// <param name="photoType">PhotoType 属性的初始值。</param> /// <param name="uploaderId">UploaderId 属性的初始值。</param> /// <param name="uploaderType">UploaderType 属性的初始值。</param> /// <param name="uploadDate">UploadDate 属性的初始值。</param> public static Photo CreatePhoto(global::System.Int32 photoId, global::System.String path, global::System.String photoType, global::System.Int32 uploaderId, global::System.String uploaderType, global::System.DateTime uploadDate) { Photo photo = new Photo(); photo.PhotoId = photoId; photo.Path = path; photo.PhotoType = photoType; photo.UploaderId = uploaderId; photo.UploaderType = uploaderType; photo.UploadDate = uploadDate; return photo; }