I have recently switched over to using SQLMetal to generate my LINQ-to-SQL DBML and Context class. There are two things I like about it, one is that it is far faster. I just click a script on my desktop rather than open up the designer and recreate each table that has changed. I also prefer some of its naming conventions, it deals with multiple relationships to a single table better.
Consider the case where you have an Orders
table and it has two fields holding Address
keys (ie ShippingAddressID
and InvoiceAddressID
). The LINQ-to-SQL generator in Visual Studio will create 4 properties ShippingAddressID
, InvoiceAddressID
, Address
, Address1
. The last two being references to the Address
entities. The problem being you cant work out which is which. SQLMetal will detect this and one of them will be named ShippingAddress
, sadly the other will still be simply Address
. There is hope though.
Read More