public string GetExistingUsername(string rowKey, string notificationUri)
{
string retVal = string.Empty;
using (INotificationRepository rep = new NotificationRepository())
{
Notification notification = rep.GetByRowKey(rowKey);
if (notification != null)
{
retVal = notification.UserName;
notification.NotificationUri = notificationUri;
notification.LastVerification = DateTime.UtcNow;
rep.Update(notification);
rep.SaveChanges();
}
}
return retVal;
}