Ejemplo n.º 1
0
 /// <summary>
 /// Deprecated Method for adding a new object to the Messages EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToMessages(Message message)
 {
     base.AddObject("Messages", message);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Create a new Message object.
 /// </summary>
 /// <param name="messageId">Initial value of the MessageId property.</param>
 /// <param name="number">Initial value of the Number property.</param>
 /// <param name="created">Initial value of the Created property.</param>
 /// <param name="originId">Initial value of the OriginId property.</param>
 /// <param name="uniqueId">Initial value of the UniqueId property.</param>
 /// <param name="eventId">Initial value of the EventId property.</param>
 /// <param name="rowGuid">Initial value of the RowGuid property.</param>
 /// <param name="status">Initial value of the Status property.</param>
 public static Message CreateMessage(global::System.Int32 messageId, global::System.String number, global::System.DateTime created, global::System.Int32 originId, global::System.Int32 uniqueId, global::System.Int32 eventId, global::System.Guid rowGuid, global::System.String status)
 {
     Message message = new Message();
     message.MessageId = messageId;
     message.Number = number;
     message.Created = created;
     message.OriginId = originId;
     message.UniqueId = uniqueId;
     message.EventId = eventId;
     message.RowGuid = rowGuid;
     message.Status = status;
     return message;
 }
 private static MessageEntity MessageToEntity(Message message)
 {
     return new MessageEntity()
     {
         MessageId = message.MessageId,
         NumberTo = message.Number,
         Sender = message.Sender,
         Text = message.Text,
         DateCreated = message.Created,
         OriginId = message.OriginId,
         UniqueId = message.UniqueId,
         EventId = message.EventId,
         RowGuid = message.RowGuid
     };
 }
        private static MessageEntity ConvertToMessageEntity(Message message)
        {
            MessageEntity entity = new MessageEntity()
            {
                MessageId = message.MessageId,
                NumberTo = message.Number,
                Sender = message.Sender,
                Text = message.Text,
                EncryptedText = message.EncryptedText,
                OriginId = message.OriginId,
                UniqueId = message.UniqueId,
                DateCreated = message.Created,
                Status = message.Status
            };

            return entity;
        }
        private static Message EntityToMessage(MessageEntity entity, Message message)
        {
            message.Number = entity.NumberTo;
            message.Sender = entity.Sender;
            message.Text = entity.Text;
            message.Created = entity.DateCreated;
            message.OriginId = entity.OriginId;
            message.UniqueId = entity.UniqueId;
            message.EventId = entity.EventId;
            message.RowGuid = entity.RowGuid;
            message.Status = entity.Status;

            return message;
        }