int
attribute that in my system is an attribute of type Enumeration
in Repository Pattern
?
I made a class:
public class Status : Enumeration
{
public static readonly Status Active = new Status(0, "Active");
public static readonly Status Inactive = new Status(1, "Inactive");
public static readonly Status Removed = new Status(2, "Removed");
public Status()
{
}
private Status(int value, string displayName)
: base(value, displayName)
{
}
}
Then in class Bank
I put an attribute of type Status
;
At the time of reading from the database where my class Bank
is a table with an attribute Status
type int
, but the attribute is null
.
How can I resolve this?