How do I Handle Business Logic Exceptions?

This video shows you how to add validation to the data model. You will be able to see how that validation logic is reflected in the UI.

Presented by Scott Hanselman

Duration: 5 minutes, 32 seconds

Date: 8 May 2008

Watch the video   |   Download the video

Video downloads: WMV | Zune | iPod | PSP | MPEG-4 | 3GP

Audio downloads: AAC | WMA | MPEG-4 | MPEG-3 | MPEG-2

Comments : 4

Leave a Comment

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.

Featured Product

ComponentArt's New AJAX Approach