I have a DB table (Profile) to describe a person. This table has a column "Sex" (int). In .NET part I have:
public enum Sex { Male = 1, Female = 2 }
public class Profile{
public int ID {get; set;}
public Sex Sex {get; set;}
}
...
SimpleRepository _repo = new SimpleRepository("ConnectionString");
_repo.Add<Profile>(profile);
After this operation Subsonic inserts a new row, but a "Sex" field is NULL. I tried INT and VARCHAR type for "Sex" column but without any result. Also I tried another name for enum, for example "SexEnum". Do you have any ideas? May be some name convention is needed or a special type for a table column. Thank you in advance.