1

I would like to perform status validation for maybe hundreds or thousands of linq to sql objects. For example, only Status A & B can change to Status C, then C can change to D, ...

Considering performance and scalability, what is the best solution?
Will "DetectChanges" suitable for my scenario?

Blachshma
  • 17,097
  • 4
  • 58
  • 72
Teddy
  • 1,407
  • 10
  • 19
  • this doesn't seem like nearly enough information for anyone to give you an answer. also, asking for 'best solution' is generally frowned upon here as it seems higly subjective. – nathan gonzalez Dec 17 '12 at 03:14
  • what you need is a state machine implementation. That will handle status change of given Object – Yusubov Dec 17 '12 at 03:15

1 Answers1

1

What you need is a simple implementation of state machine concept in your code.

As it is fairly known concept in software engineering, i will just provide usefull resources with examples to follow and implement this concept.

Here you are the resources:

Community
  • 1
  • 1
Yusubov
  • 5,815
  • 9
  • 32
  • 69
  • 1
    Thank you. Yes it's a well known concept and I'll try to see its performance when calling in a loop. – Teddy Dec 17 '12 at 03:27