Ejemplo 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();
 }
Ejemplo 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);
 }
Ejemplo 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;
 }
Ejemplo n.º 4
0
 // Delete a existed Attachment
 public void DeleteAttachment(Attachment _attachment)
 {
     unitOfWork.Delete<Attachment>(_attachment);
 }
Ejemplo n.º 5
0
 // Add a new Attachment
 public Attachment AddAttachment(Attachment _attachment)
 {
     unitOfWork.Add<Attachment>(_attachment);
     return _attachment;
 }
Ejemplo n.º 6
0
 // Update a existed Attachment
 public Attachment UpdateAttachment(Attachment _attachment)
 {
     unitOfWork.Update<Attachment>(_attachment);
     return _attachment;
 }
Ejemplo n.º 7
0
 // Refresh an existed Attachment
 public Attachment RefeshAttachment(Attachment _attachment)
 {
     unitOfWork.Refresh<Attachment>(_attachment);
     return _attachment;
 }
Ejemplo n.º 8
0
 // Default contructor
 public AttachmentModel()
 {
     this.IsNewItem = true;
     this._attachment = new Attachment();
 }