LINQ to SQL: features not in the designer / SqlMetal

I often answer questions based on what the run-time (System.Data.Linq.dll) supports, sometimes realizing only later that the run-time feature may not be supported by the visual designer in Visual Studio. Some of these are supported by the command line SDK tool SqlMetal.exe while others are supported by neither tool and require writing code (in C#/VB code editor in VS hopefully 🙂 )

Feature supported by designer but not by SqlMetal

  1. Many obvious things like selecting a subset of tables, columns, views, renaming members, changing types 

  2. Inheritance hierarchy mapping

  3. Unidirectional association (yes it is in the designer if you look at association properties just a bit longer)

Features supported by SqlMetal but not by the designer in VS (for most cases, see SqlMetal /? output)

  1. Extracting classes from SQL Server Compact (SSC)

  2. External mapping file

  3. Injecting a (unmapped) base class for all generated entities

  4. Sprocs returning multiple results

  5. Setting DeleteOnNull to true when it is inferred to false

Key features supported by neither design tool but supported by run-time (i.e you have to use code editor and write code the old fashioned way)

  1. POCO (Plain Old CLR Objects) – this is worth another blog post

  2. User overrides (e.g. sprocs) for relationship loading

I am sure I am forgetting some detailed ones in each category. OK, so please help me make the lists better!


Comments (7)

  1. Roller says:

    I often answer questions based on what the run-time (System.Data.Linq.dll) supports, sometimes realizing

  2. Welcome to the thirty-third edition of Community Convergence. This week we have a new video called Programming

  3. Dinesh has a list of changes here. If you’re using LINQ to SQL then this will have an impact on you….

  4. If you work with LINQ to SQL then you might want to take a look at this posts of Dinesh Kulkarni: LINQ

  5. 曹振华 says:


  6. Visual Studio 2008 LINQ to SQL 的Beta 2测试版和RTM正式版的差异