0

I have a class containing Linq To SQL objects that are used to populate drop downlists on a view. Using Scott Gu's Nerd Dinner I am implementing the validation framework they use, using partial classes. This works fine when working with one object for (example dinner) per view. But when I use a class that is not a Linq To Sql object, I cannot get the validation working. Any ideas?

1
  • 2
    Please, post extracts from working and not working code. Commented May 22, 2009 at 13:45

1 Answer 1

1

The Nerd Dinner app leverages the events that are fired when Linq To SQL persists data. Specifically, the OnValidate() method.

Since you have a class that is not Linq To Sql, you can fake it by creating your own custom event handler and firing it when the data in the changes.

As an alternative, just call a method that validates a given object, calling as many validation functions as you have objects.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.