When attempting to add attributes, such as RequiredAttribute, using CodeAttributes, an ambiguous reference error is encountered in the generated class. This issue arises specifically when using the following line of code:
Error CS0104: 'DataType' is an ambiguous reference between 'System.ComponentModel.DataAnnotations.DataType' and 'LinqToDB.DataType'
Current Limitation
As of now, there doesn't appear to be a straightforward method to specify attributes using their fully qualified namespace within the CodeAttributes addition. This limitation poses a challenge in resolving the ambiguous reference.
My Problem
When attempting to add attributes, such as
RequiredAttribute
, usingCodeAttributes
, an ambiguous reference error is encountered in the generated class. This issue arises specifically when using the following line of code:Encountered Error
The error message received is as follows:
Current Limitation
As of now, there doesn't appear to be a straightforward method to specify attributes using their fully qualified namespace within the
CodeAttributes
addition. This limitation poses a challenge in resolving the ambiguous reference.