I am working on a C# Silverlight application that uses Entity Framework, I was wondering if there is a way to make a field required based on other pieces of data? To make this more complicated the application has 1 save button that lives outside of the various forms and is added and uses impersonation to keep all the save functions in 1 spot.
Now for example I have member type 1,2,3,4,5,6. If the type is 1-4 then the DOB is required and cannot be left null and will provide the error to support that. But for 5-6 it can be left null.
From what I can tell, the errors are being thrown by Entity itself when it is not given a null to insert into a not null.