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'"?

CheGuevarasBeret
  • 1,364
  • 2
  • 14
  • 33
  • Neither you should put N/A (not applicable) in the cell, because that's what's the matter here. – Johan Sep 11 '13 at 04:18
  • Ok, N/A - Not Selected, whatever the terminology I am going to either need to make the column nullable or create a N/A value for each of my dropdowns to store yes? – CheGuevarasBeret Sep 11 '13 at 10:53

0 Answers0