UpdateDBSchema compares a Linq-to-SQL data context meta model with the underlying database and adjusts the db schema to match the data context model.
Namespace:
Huagati.DBMLTools.RuntimeAssembly: HuagatiDBMLToolsRTE (in HuagatiDBMLToolsRTE.dll) Version: 1.66.3362.23798
Syntax
C# |
---|
public static bool UpdateDBSchema( this DataContext dc ) |
Visual Basic (Declaration) |
---|
<ExtensionAttribute> _ Public Shared Function UpdateDBSchema ( _ dc As DataContext _ ) As Boolean |
Visual C++ |
---|
[ExtensionAttribute] public: static bool UpdateDBSchema( DataContext^ dc ) |
Parameters
- dc
- Type: System.Data.Linq..::.DataContext
A Linq to SQL data context.
Return Value
True if successful, false if updating the schema failed
Examples
This example shows how to call UpdateDBSchema for a the DataContext's default connection.
CopyC#

using Huagati.DBMLTools.Runtime; public class UpdateDCSample { public void UpdateSchema() { SomeDataContext dc = new SomeDataContext(); //attempt to update the database schema dc.UpdateDBSchema(); } }