コード例 #1
0
        public void AddMailingList(MailingList mailingList)
        {
            var tableObject = new Table.MailingList
            {
                RowKey           = "mailinglist",
                PartitionKey     = mailingList.ListName,
                Description      = mailingList.Description,
                FromEmailAddress = mailingList.FromEmailAddress
            };
            var insertOperation = TableOperation.Insert(tableObject);

            _mailingListTable.Value.Execute(insertOperation);
        }
コード例 #2
0
        public void UpdateMailingList(string listName, MailingList mailingList)
        {
            var tableObject = new Table.MailingList
            {
                Description      = mailingList.Description,
                FromEmailAddress = mailingList.FromEmailAddress,
                RowKey           = "mailinglist",
                PartitionKey     = listName,
                ETag             = "*"
            };
            var replaceOperation = TableOperation.Replace(tableObject);

            _mailingListTable.Value.Execute(replaceOperation);
        }