C# Class nHydrate.Generator.SqlSchemaToModel

Exibir arquivo Open project: nHydrate/nHydrate

Public Methods

Method Description
GetCompanyName ( string connectionString ) : string
GetDatabaseCollation ( string connectionString ) : string
GetDatabaseName ( string connectionString ) : string
GetProjectFromSqlSchema ( nHydrateGeneratorProject project, string connectionString, bool refreshModel, bool assumeInheritance ) : bool

Load a database schema

GetProjectName ( string connectionString ) : string
GetSQLVersion ( string connectionString ) : SQLServerTypeConstants
GetTableCount ( string connectionString ) : int
GetTableDefinitionFromDatabase ( string connectionString, string tableName, ModelRoot root ) : IEnumerable
GetTableListFromDatabase ( string connectionString ) : IEnumerable
ImportModel ( ModelRoot currentGraph, ModelRoot newGraph, ImportModelSettings settings, List selectedTables, List selectedViews ) : ImportReturnConstants

Show a windows to refresh teh model from a database

IsSupportedSQLVersion ( string connectionString ) : bool
IsValidConnectionString ( string connectionString ) : bool
LoadRelations ( nHydrateGeneratorProject project, bool assumeInheritance, string connectionString ) : void
SetupNewProject ( nHydrateGeneratorProject project, string connectionString ) : void

Load a database schema

Private Methods

Method Description
CanUseExtendedProperty ( string connectionString ) : bool
GetSqlColumnInfoAuxForTable ( ) : string
GetSqlColumnsForTable ( ) : string
GetSqlColumnsForTable ( string tableName ) : string
GetSqlColumsDescription ( string tableName ) : string
GetSqlDatabaseTables ( ) : string
GetSqlForRelationships ( ) : string
GetSqlForStoredProcedures ( string spPrefix ) : string
GetSqlForStoredProceduresBody ( string spName, string connectionString ) : string
GetSqlForStoredProceduresParameters ( string spPrefix ) : string
GetSqlForViews ( ) : string
GetSqlForViewsColumns ( ) : string
GetSqlIndexesForTable ( ) : string
LoadStoredProcedures ( nHydrateGeneratorProject project, string connectionString ) : void
LoadViews ( nHydrateGeneratorProject project, string connectionString ) : void
SetupDefault ( Column field, string defaultvalue ) : void
UpdateRelations ( nHydrate newDatabase, nHydrate oldDatabase ) : void
UpdateTables ( nHydrate newDatabase, nHydrate oldDatabase, List selectedTables, ImportModelSettings settings ) : void
UpdateViews ( nHydrate newDatabase, nHydrate oldDatabase, List selectedViews, ImportModelSettings settings ) : void

Method Details

GetCompanyName() public static method

public static GetCompanyName ( string connectionString ) : string
connectionString string
return string

GetDatabaseCollation() public static method

public static GetDatabaseCollation ( string connectionString ) : string
connectionString string
return string

GetDatabaseName() public static method

public static GetDatabaseName ( string connectionString ) : string
connectionString string
return string

GetProjectFromSqlSchema() public static method

Load a database schema
public static GetProjectFromSqlSchema ( nHydrateGeneratorProject project, string connectionString, bool refreshModel, bool assumeInheritance ) : bool
project nHydrateGeneratorProject The project object to load from database
connectionString string
refreshModel bool Determines whether to load all model controllers and other UI components
assumeInheritance bool
return bool

GetProjectName() public static method

public static GetProjectName ( string connectionString ) : string
connectionString string
return string

GetSQLVersion() public static method

public static GetSQLVersion ( string connectionString ) : SQLServerTypeConstants
connectionString string
return SQLServerTypeConstants

GetTableCount() public static method

public static GetTableCount ( string connectionString ) : int
connectionString string
return int

GetTableDefinitionFromDatabase() public static method

public static GetTableDefinitionFromDatabase ( string connectionString, string tableName, ModelRoot root ) : IEnumerable
connectionString string
tableName string
root nHydrate.Generator.Models.ModelRoot
return IEnumerable

GetTableListFromDatabase() public static method

public static GetTableListFromDatabase ( string connectionString ) : IEnumerable
connectionString string
return IEnumerable

ImportModel() public static method

Show a windows to refresh teh model from a database
public static ImportModel ( ModelRoot currentGraph, ModelRoot newGraph, ImportModelSettings settings, List selectedTables, List selectedViews ) : ImportReturnConstants
currentGraph nHydrate.Generator.Models.ModelRoot
newGraph nHydrate.Generator.Models.ModelRoot
settings ImportModelSettings
selectedTables List
selectedViews List
return ImportReturnConstants

IsSupportedSQLVersion() public static method

public static IsSupportedSQLVersion ( string connectionString ) : bool
connectionString string
return bool

IsValidConnectionString() public static method

public static IsValidConnectionString ( string connectionString ) : bool
connectionString string
return bool

LoadRelations() public static method

public static LoadRelations ( nHydrateGeneratorProject project, bool assumeInheritance, string connectionString ) : void
project nHydrateGeneratorProject
assumeInheritance bool
connectionString string
return void

SetupNewProject() public static method

Load a database schema
public static SetupNewProject ( nHydrateGeneratorProject project, string connectionString ) : void
project nHydrateGeneratorProject The project object to load from database
connectionString string
return void