google-code-export / dblinq2007

Automatically exported from code.google.com/p/dblinq2007
Other
0 stars 0 forks source link

CodeDom generator doesn't support the //Column/@Modifier DBML attribute. #261

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Reported at:

http://groups.google.com/group/dblinq/browse_thread/thread/9a98a772c78ecd86

The //Column/@Modifier DBML attribute controls member access modifiers that 
should be used on the generated member.  For example, the DBML fragment:

    <Column
        Name="SiteId"
        Modifier="Override"
        Member="SiteID"
        Storage="_siteID"
        Type="System.UInt32"
        DbType="int unsigned"
        IsPrimaryKey="false"
        IsDbGenerated="false"
        CanBeNull="false"
    /> 

Should generate the C# code:

    [Column(Storage = "_siteID", Name = "SiteId", DbType = "int unsigned",
        CanBeNull = false)]
    public override uint SiteID

It instead generates:

    [Column(Storage = "_siteID", Name = "SiteId", DbType = "int unsigned",
        CanBeNull = false)]
    public uint SiteID

Note the missing 'override' keyword.

Original issue reported on code.google.com by jonmpr...@gmail.com on 22 Jun 2010 at 7:00