CodeAttribute class #3768
Replies: 2 comments
-
Yes, you can use it for any attributes, not only for linq2db attributes |
Beta Was this translation helpful? Give feedback.
-
My ProblemWhen attempting to add attributes, such as col.Property.CustomAttributes.Add(new CodeAttribute(typeParser.Parse<RequiredAttribute>())); Encountered ErrorThe error message received is as follows:
Current LimitationAs of now, there doesn't appear to be a straightforward method to specify attributes using their fully qualified namespace within the |
Beta Was this translation helpful? Give feedback.
-
I am playing with custom attributes and with the CodeAttribute class.
There is lot of interfaces there but it is hard to guess concrete implementations.
Anyway, I want to add something that is not directly related to Linq2DB and database, but lets say that the same entity i might use in GRPC services. And then on the class I would like to put attribute [DataContract],
on the property i would like to put custom attribute [DataMember(Order = 1)]
Is it possible to do it with the CodeAttribute class
Beta Was this translation helpful? Give feedback.
All reactions