I have two Classes
public class Notification
{
public virtual Guid ID { get; set; }
public virtual IEnumerable<Message> Messages {get;set;}
}
public class Message
{
public virtual Guid ID { get; set; }
public virtual string Message { get; set; }
}
I have two .ascx controls on my page and one invokes a Bind on the other through a public method. Now if I add a row to the Message List and then run my bind method that simply Gets a notification by ID and returns messages. I dont get the newly added message. I must refresh the page again before it gets this data.
Is there something about the IEnumerable caching or how do I force it to go back to the Database I run Session.Get<> but it does not have the effect I want.
I have also tried
Session.Evict
Session.Refresh