I have a SPA using Angular and Breeze using WebAPI against MS SQL. In the data model booleans are represented as bit or integer. As I bind a checkbox to the angular model I want two way binding where checked = 1 and unchecked = 0. I understand the binding wants to work with strings.
I have looked at as many QAs here as I cand find on this topic but none seem exactly what I am looking for and I am also wondering if using Angular/Breeze/EF Pocos I should be changing something at the model level for what are essentially booleans so as to not "fight the framework".
This is also my first EF app. If i have SQL bit columns and call them boolean in my poco classes will EF take care of the conversion to 0 or 1?
I have to assume this wheel has been invented over and over but I am still wrapping my head around Angular.
<input type="checkbox" data-ng-model="haz.selected" data-ng-true-value="1" data-ng-false-value="0"/>