I would like to have some enums available in my web application. I have a sharedlib type class which has all my DTOs and is referenced by all layers, so I will put it in that project.
I created a .cs file, and added a public enum:
namespace Objects { public enum EntityType { Thirdparty = 1, BankAccount = 2 } } I have reference data in my SQL table:

I'd like to be able to reference my enums like this:
if(EntityTypeId==Objects.EntityType.BankAccount) ... However, I can't compare an Int, to an Object.EntityType.
How can this be achieved and a nice clean way? Constants instead?