Home Dashboard Directory Help
Search

Linq To SQL generates code that is not CLS compliant by PSvahn


Status: 

Closed
 as Won't Fix Help for as Won't Fix


0
0
Sign in
to vote
Type: Bug
ID: 472971
Opened: 7/7/2009 8:17:46 AM
Access Restriction: Public
0
Workaround(s)
view
0
User(s) can reproduce this bug

Description

When adding inheritance relations between classes in the O/R designer, the acess level on the generated backing store member of the Id attribute, "_Id", is changed from private to protected, causing the CLS rule violation. The Id property is used in an association between the classes.
Details
Sign in to post a comment.
Posted by Microsoft on 7/14/2009 at 12:43 PM
Thanks for reporting the issue. Given the severity of the issue and where we are in the release, we won't be able to address this issue at this time.

We have spoken to Damien, who owns the LINQ to SQL Templates for T4 on CodePlex to consider stopping of prefixing fields with underscores, so that it is an option if you really do require CLS compliance of the generated code. You can find the T4 templates for LINQ to SQL at http://l2st4.codeplex.com/.

Thanks.
LINQ to SQL team
Posted by Microsoft on 7/10/2009 at 3:12 AM
Thanks for your feedback. We are routing this bug to the product unit who works on that specific feature area. The team will review this issue and make a decision on whether they will fix it or not for the next release.

Thank you,
Visual Studio Product Team
Sign in to post a workaround.