-
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor - extract interface for db handling
To assist with multi-db support issue #16
- Loading branch information
Showing
4 changed files
with
39 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
namespace EfEnumToLookup.LookupGenerator | ||
{ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Data.SqlClient; | ||
|
||
internal interface IDbHandler | ||
{ | ||
/// <summary> | ||
/// The size of the Name field that will be added to the generated lookup tables. | ||
/// Adjust to suit your data if required. | ||
/// </summary> | ||
int NameFieldLength { get; set; } | ||
|
||
/// <summary> | ||
/// Prefix to add to all the generated tables to separate help group them together | ||
/// and make them stand out as different from other tables. | ||
/// </summary> | ||
string TableNamePrefix { get; set; } | ||
|
||
/// <summary> | ||
/// Suffix to add to all the generated tables to separate help group them together | ||
/// and make them stand out as different from other tables. | ||
/// </summary> | ||
string TableNameSuffix { get; set; } | ||
|
||
void Apply(List<LookupData> lookups, IList<EnumReference> enumReferences, Action<string, IEnumerable<SqlParameter>> runSql); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters