Closed MoeHamdan closed 6 years ago
What kind of issue is this?
[X ] Bug report. [ ] Feature request.
When having a Nullable enum as property in a class it will not be mapped.
It should be mapped correctly.
` public class Employee { public int EmployeeId { set; get; } public string EmpNo { set; get; } public string FirstName { set; get; } public string LastName { set; get; } public string PreferredName { set; get; } public DateTime? DateOfBirth { set; get; } public Gender? Gender { set; get; } public DateTime HiredDate { get; set; } public DateTime? Terminated { set; get; } public bool IsFieldStaff { get; set; } public bool IsAvailableForEmergencyPlacement { set; get; } public bool IsTrainee { set; get; } }
public enum Gender { Male, Female, Nothing }
` Try using something similar to the above class you will notice that it will not fill the Gender correctly.
This issue happens when the value returned from the database is string "Female", "Male"
This is fixed in 6.2.1 (thanks @Powerz).
Posting a build soon.
Type
What kind of issue is this?
Current Behavior
When having a Nullable enum as property in a class it will not be mapped.
Expected behavior
It should be mapped correctly.
Steps to Reproduce
` public class Employee { public int EmployeeId { set; get; } public string EmpNo { set; get; } public string FirstName { set; get; } public string LastName { set; get; } public string PreferredName { set; get; } public DateTime? DateOfBirth { set; get; } public Gender? Gender { set; get; } public DateTime HiredDate { get; set; } public DateTime? Terminated { set; get; } public bool IsFieldStaff { get; set; } public bool IsAvailableForEmergencyPlacement { set; get; } public bool IsTrainee { set; get; } }
` Try using something similar to the above class you will notice that it will not fill the Gender correctly.
Any other comment
This issue happens when the value returned from the database is string "Female", "Male"