0

I have an MVVM application, EF code first.

In my model I have an Appointment entity and this entity has navigation properties which are Types such as AppointmentType; AppointmentDuration; AppointmentConsultant. These were all specified as 1-1 in initial requirements. So my Appointment model has the [Required] annotation on the Ids' of these types.

Of course 6 months after the client starting to use the system in anger they have identified that if they mark an appointment as "DidNotAttend" then they don't want to have to select the, once mandatory, types.

My question is, seeing as these types all exist in database tables, and my code has enumerations matching the Ids, would you add a new types, and enum values, for each of these with description of NotSelected, or simply amend the underlying database structure and model to make these not required/nullable integers, and write business logic in view model to say, "if AttendanceIndicator is NOT 'DidNotAttend' then check each is NOT 'NotSelected'"?

4

0 回答 0