public ActionResult Edit(string partitionKey, string rowKey) { var group=new GroupFeed(); if (!string.IsNullOrEmpty(partitionKey) && !string.IsNullOrEmpty(rowKey)) { group = _groupFeedRepository.GetByPartitionKeyAndRowKey(partitionKey, rowKey); } return View(group); }
public ActionResult Edit(GroupFeed group) { if (string.IsNullOrEmpty(group.RowKey)) { group.RowKey = Guid.NewGuid().ToString(); } var groupFeed = new GroupFeed { PartitionKey = _userId, RowKey = group.RowKey, Title = group.Title, Description = group.Description, Timestamp = new DateTimeOffset(DateTime.Now) }; _groupFeedRepository.InsertOrReplace(groupFeed); return RedirectToAction("Index"); }