/// <summary>
 /// Create a new IncomingMessage object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="originator">Initial value of the Originator property.</param>
 /// <param name="timezone">Initial value of the Timezone property.</param>
 /// <param name="message">Initial value of the Message property.</param>
 /// <param name="messageType">Initial value of the MessageType property.</param>
 /// <param name="receivedDate">Initial value of the ReceivedDate property.</param>
 /// <param name="validityTimeStamp">Initial value of the ValidityTimeStamp property.</param>
 /// <param name="originatorRefNo">Initial value of the OriginatorRefNo property.</param>
 /// <param name="srcPort">Initial value of the SrcPort property.</param>
 /// <param name="gatewayId">Initial value of the GatewayId property.</param>
 /// <param name="lastUpdate">Initial value of the LastUpdate property.</param>
 /// <param name="createDate">Initial value of the CreateDate property.</param>
 public static IncomingMessage CreateIncomingMessage(global::System.String id, global::System.String originator, global::System.String timezone, global::System.String message, global::System.String messageType, global::System.DateTime receivedDate, global::System.DateTime validityTimeStamp, global::System.Int64 originatorRefNo, global::System.Int64 srcPort, global::System.String gatewayId, global::System.DateTime lastUpdate, global::System.DateTime createDate)
 {
     IncomingMessage incomingMessage = new IncomingMessage();
     incomingMessage.Id = id;
     incomingMessage.Originator = originator;
     incomingMessage.Timezone = timezone;
     incomingMessage.Message = message;
     incomingMessage.MessageType = messageType;
     incomingMessage.ReceivedDate = receivedDate;
     incomingMessage.ValidityTimeStamp = validityTimeStamp;
     incomingMessage.OriginatorRefNo = originatorRefNo;
     incomingMessage.SrcPort = srcPort;
     incomingMessage.GatewayId = gatewayId;
     incomingMessage.LastUpdate = lastUpdate;
     incomingMessage.CreateDate = createDate;
     return incomingMessage;
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the IncomingMessages EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToIncomingMessages(IncomingMessage incomingMessage)
 {
     base.AddObject("IncomingMessages", incomingMessage);
 }
 public ActionResult Edit(IncomingMessage incomingmessage)
 {
     if (ModelState.IsValid)
     {
         repository.Update<IncomingMessage>(incomingmessage);
         repository.UnitOfWork.SaveChanges();          
         return RedirectToAction("Index");
     }
     return View(incomingmessage);
 }