Here is a good link from MSDN that explains how to deploy database changes to an exsisting database.
Month: August 2010
Get a Copyiable list of fields from a table
A fast way to get a list you can copy into a code file with all the fields in a table.
select COLUMN_NAME from INFORMATION_SCHEMA.COLUMNS where TABLE_NAME = ‘tablename’
Eager Loading in Entity Framework
Entity Framework (EF) does not support lazy loading. You must explicitly load the comments advising the EF what to include.
Using ctx as new MyDataContext()
lvComments.DataSource = ctx.Entity.Include(“SomethingToInclude”).First().Comments
lvComments.Databind()
End Using
Or
Using ctx as new MyDataContext()
Dim MyListOfSomething as List(of ListOfSomething) = ctx.ListOfSomething
MyListOfSomething.SomethingToLoad.Load()
lvComments.DataSource = MyListOfSomething.Comments
lvComments.DataBind()
End Using