/// <summary> /// Create a new Attachment object. /// </summary> /// <param name="attachmentId">Initial value of the AttachmentId property.</param> /// <param name="sourceType">Initial value of the SourceType property.</param> /// <param name="sourceId">Initial value of the SourceId property.</param> /// <param name="name">Initial value of the Name property.</param> /// <param name="fileType">Initial value of the FileType property.</param> /// <param name="modifiedBy">Initial value of the ModifiedBy property.</param> /// <param name="modifiedDate">Initial value of the ModifiedDate property.</param> /// <param name="createdBy">Initial value of the CreatedBy property.</param> /// <param name="createdDate">Initial value of the CreatedDate property.</param> public static Attachment CreateAttachment(global::System.Int32 attachmentId, global::System.Int32 sourceType, global::System.Int32 sourceId, global::System.String name, global::System.String fileType, global::System.Int32 modifiedBy, global::System.DateTime modifiedDate, global::System.Int32 createdBy, global::System.DateTime createdDate) { Attachment attachment = new Attachment(); attachment.AttachmentId = attachmentId; attachment.SourceType = sourceType; attachment.SourceId = sourceId; attachment.Name = name; attachment.FileType = fileType; attachment.ModifiedBy = modifiedBy; attachment.ModifiedDate = modifiedDate; attachment.CreatedBy = createdBy; attachment.CreatedDate = createdDate; return attachment; }
/// <summary> /// Deprecated Method for adding a new object to the Attachments EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToAttachments(Attachment attachment) { base.AddObject("Attachments", attachment); }