As an entity class, I want to add an attributes at run-time, how should I do?
Attributes are part of the meta-data of a type and so they are hardcoded in the compiled assembly (that's also why you are only allowed to use some primitive types and not arbitrary data at attributes).
The consequence is that you can't add any attributes to a type at runtime. But there are various alternative techniques. You could use simple dictionaries or something more powerful like attached dependency properties.