Share via


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!

Thanks,
Dinesh

Comments

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

  • Anonymous
    October 11, 2007
    Pingback from http://oakleafblog.blogspot.com/2007/10/linq-to-sql-and-entity-framework-xml.html

  • Anonymous
    October 15, 2007
    Welcome to the thirty-third edition of Community Convergence. This week we have a new video called Programming

  • Anonymous
    October 17, 2007
    Dinesh has a list of changes here. If you're using LINQ to SQL then this will have an impact on you....

  • Anonymous
    October 27, 2007
    If you work with LINQ to SQL then you might want to take a look at this posts of Dinesh Kulkarni: LINQ

  • Anonymous
    December 02, 2007
    FollowScottGuthrie的例子学习LINQ,结果找了半天也没有找到Table

  • Anonymous
    April 20, 2008
    Visual Studio 2008 LINQ to SQL 的Beta 2测试版和RTM正式版的差异