The column in my database table is of type 'tinyint', which will map to 'byte' in .NET. And here's what my enum type looks like.
public enum ForgotPasswordStatus { Pending = 0, Verified = 1 }Checking another article at USING EXISITING ENUM TYPES IN ENTITY FRAMEWORK 5, I found the reason I got the error was because I did not explicitly define the underlying type of my enum ForgotPasswordStatus. After adding the underlying type to my enum as follows, my test passes now.
public enum ForgotPasswordStatus : byte { Pending = 0, Verified = 1 }
No comments:
Post a Comment