Esempio n. 1
0
 // Default contructor that set entity to field
 public AttachmentModel(Attachment attachment)
 {
     this._attachment = attachment;
     this._id = attachment.Id;
     this._file_attachments_id = attachment.FileAttachmentsId;
     this._originalAttachment = attachment.DeepClone();
 }
Esempio n. 2
0
 /// <summary>
 /// Deprecated Method for adding a new object to the Attachment EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToAttachment(Attachment attachment)
 {
     base.AddObject("Attachment", attachment);
 }
Esempio n. 3
0
 /// <summary>
 /// Create a new Attachment object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="fileAttachmentsId">Initial value of the FileAttachmentsId property.</param>
 public static Attachment CreateAttachment(global::System.Guid id, global::System.Int32 fileAttachmentsId)
 {
     Attachment attachment = new Attachment();
     attachment.Id = id;
     attachment.FileAttachmentsId = fileAttachmentsId;
     return attachment;
 }
Esempio n. 4
0
 // Delete a existed Attachment
 public void DeleteAttachment(Attachment _attachment)
 {
     unitOfWork.Delete<Attachment>(_attachment);
 }
Esempio n. 5
0
 // Add a new Attachment
 public Attachment AddAttachment(Attachment _attachment)
 {
     unitOfWork.Add<Attachment>(_attachment);
     return _attachment;
 }
Esempio n. 6
0
 // Update a existed Attachment
 public Attachment UpdateAttachment(Attachment _attachment)
 {
     unitOfWork.Update<Attachment>(_attachment);
     return _attachment;
 }
Esempio n. 7
0
 // Refresh an existed Attachment
 public Attachment RefeshAttachment(Attachment _attachment)
 {
     unitOfWork.Refresh<Attachment>(_attachment);
     return _attachment;
 }
Esempio n. 8
0
 // Default contructor
 public AttachmentModel()
 {
     this.IsNewItem = true;
     this._attachment = new Attachment();
 }