|
| CODEWIRE.NET : On May 31, 2008 4:59 PM said: |
How du I access Session in the partiel method like OnValidate? I want to set a field to a session-variable on every insert.
if (action == System.Data.Linq.ChangeAction.Insert)
{
Id = Guid.NewGuid();
AccountId = Session("AccontId"); // Current account
}
|
|
|
| shanselman : On June 09, 2008 2:25 PM said: |
You would need to use HttpContext.Current.Session, but I think you'd be tying your model objects to the Session which could limit your design's usefulness in other projects.
|
|
|
| shanselman : On June 09, 2008 2:25 PM said: |
You'd need to use HttpContext.Current.Session.
|
|
|
| Dom Márcio : On July 07, 2008 10:39 PM said: |
Hi Scott. How can I implement business logic in the Delete-Insert-Update/Object partial method in the DataContext partial class? Thanks in advance.
|
|
Leave a Comment
You must be logged in to leave a comment. Click here to log in.