public static MessageEntity MessageContractToMessageEntity(Message contract)
        {
            MessageEntity entity = new MessageEntity()
            {
                MessageId = contract.MessageId,
                NumberTo = contract.Number,
                Text = contract.Text,
                OriginId = contract.OriginID,
                UniqueId = contract.UniqueID,
                DateCreated = contract.DateCreated
            };

            return entity;
        }
        public static Message MessageEntityToSendMessageContract(MessageEntity entity)
        {
            Message contract = new Message()
            {
                MessageId = entity.MessageId,
                Number = entity.NumberTo,
                Text = entity.Text,
                EncryptedText = entity.EncryptedText,
                OriginID = entity.OriginId,
                UniqueID = entity.UniqueId,
                DateCreated = entity.DateCreated                
            };

            return contract;
        }