Last post Oct 31, 2012 01:37 PM by agent_smith
Oct 31, 2012 01:37 PM|agent_smith|LINK
I have class that I want to validate a property using (perhaps, talk me out of this if it is a bad idea) data annotations on the model.
The property has some basic characteristics like 'required' and 'must be numbers and letters' etc, but I also want to ensure it is valid based upon an external set of criteria that likely will be in another data source outside of my project.
The property is a stock market security identifier.
I need to look in another data store to ensure the value is actually in the known universe of stock market indentifiers.
How can I abstract away any direct link to a data source in my domain model? Is this even a good design since the class could be passed around and the connect to outside data could be missing?