I came across to an issue, actually it’s in C# language in general (partial typing & auto-generated code), but I'll use DLinq as illustration.
DLinq has tool to autogenerate persistent domain types as Partial Types. These domain types members are marked with DLinq ORM related Attributes. Now, how do I mark those members with my custom Attributes (or other BCL's Attributes) outside the generated Partial Type file
We all know, editing autogenerated code will "guarantee" your handwritten part will be overwritten the next time we re-run the autogeneration tool.

How to put custom Attribute to auto-generated Partial Types members?
Jean-Nicolas
You can certainly add attributes to additional partial class members or to the class itself. But as you rightly point out, you can't declare the same member again in the user-written partial class. Hence, currently, there is no easy way to add attributes to it.
Since editing a generated class is strongly discouraged, so the best bet is to provide a way to inject your way during code gen. We will look into the options available here. A few have been discussed in the past including code gen templates that can be customized as well as visual designer property grid that lets you add such things. Of course designer is a bit out in the future.
Thanks.
Dinesh
hamidjr
There is a VS2005 add-on called the Guidance Automation Toolkit that is very interesting with regard to autogenerated code.
I don't see a way to reference declarations in one file for a class from another file for that same class; (Partial Types).
Maybe there's a way to do what you need at run-time instead
Best luck.