Click here to Skip to main content
15,504,424 members
Home / Discussions / C#
   

C#

 
GeneralRe: What is the best way to create your Database (tables..etc) using C# ? Pin
Abdalla Ben Omran10-Sep-19 6:19
Abdalla Ben Omran10-Sep-19 6:19 
AnswerRe: What is the best way to create your Database (tables..etc) using C# ? Pin
Gerry Schmitz10-Sep-19 7:02
mveGerry Schmitz10-Sep-19 7:02 
AnswerRe: What is the best way to create your Database (tables..etc) using C# ? Pin
MadMyche10-Sep-19 9:36
professionalMadMyche10-Sep-19 9:36 
QuestionRe: What is the best way to create your Database (tables..etc) using C# ? Pin
Maciej Los10-Sep-19 21:46
mveMaciej Los10-Sep-19 21:46 
AnswerRe: What is the best way to create your Database (tables..etc) using C# ? Pin
Abdalla Ben Omran10-Sep-19 22:57
Abdalla Ben Omran10-Sep-19 22:57 
GeneralRe: What is the best way to create your Database (tables..etc) using C# ? Pin
Maciej Los10-Sep-19 23:00
mveMaciej Los10-Sep-19 23:00 
GeneralRe: What is the best way to create your Database (tables..etc) using C# ? Pin
Abdalla Ben Omran10-Sep-19 23:16
Abdalla Ben Omran10-Sep-19 23:16 
AnswerRe: What is the best way to create your Database (tables..etc) using C# ? Pin
MadMyche11-Sep-19 2:43
professionalMadMyche11-Sep-19 2:43 
No to the VBA, no Entity Framework, no LINQtoSQL; I am an ADO purist.

But I'll try to explain the process if it helps. After typing this it does seems really wordy and long but after many years of doing it this way it is only a matter of minutes.
  1. Create class properties in C#
  2. Copy the properties and paste in Notepad
  3. Use find/replace to replace spaces with tabs
  4. Copy the contents and paste into Excel
  5. Add column for natural index (1,2,3)
  6. Sort by Net Data Type
  7. Add column for SQL Data Type alongside NET data type, and populate
  8. Rerrange columns around to match format of CREATE TABLE syntax
  9. Copy and paste the desired columns into SSMS new query window
The process for SQL design to a class is similar.

I also reuse/tweak the Excel content to create instances (overloaded constructs) from IDataReaders or DataRows.
Director of Transmogrification Services
Shinobi of Query Language
Master of Yoda Conditional

PraiseRe: What is the best way to create your Database (tables..etc) using C# ? Pin
Maciej Los11-Sep-19 2:59
mveMaciej Los11-Sep-19 2:59 
GeneralRe: What is the best way to create your Database (tables..etc) using C# ? Pin
MadMyche11-Sep-19 4:50
professionalMadMyche11-Sep-19 4:50 
Generallaziness is a reason for progress Pin
Maciej Los11-Sep-19 5:03
mveMaciej Los11-Sep-19 5:03 
GeneralRe: laziness is a reason for progress Pin
MadMyche11-Sep-19 5:10
professionalMadMyche11-Sep-19 5:10 
GeneralRe: What is the best way to create your Database (tables..etc) using C# ? Pin
Mycroft Holmes11-Sep-19 14:48
professionalMycroft Holmes11-Sep-19 14:48 
AnswerRe: What is the best way to create your Database (tables..etc) using C# ? Pin
C. David Johnson13-Sep-19 8:51
C. David Johnson13-Sep-19 8:51 
GeneralRe: What is the best way to create your Database (tables..etc) using C# ? Pin
Abdalla Ben Omran23-Sep-19 0:35
Abdalla Ben Omran23-Sep-19 0:35 
AnswerRe: What is the best way to create your Database (tables..etc) using C# ? Pin
Jörgen Andersson13-Sep-19 8:52
professionalJörgen Andersson13-Sep-19 8:52 
QuestionCopy text from console window Pin
Gene M9-Sep-19 2:01
Gene M9-Sep-19 2:01 
AnswerRe: Copy text from console window Pin
Richard MacCutchan9-Sep-19 2:46
mveRichard MacCutchan9-Sep-19 2:46 
AnswerRe: Copy text from console window Pin
OriginalGriff9-Sep-19 2:46
mveOriginalGriff9-Sep-19 2:46 
AnswerRe: Copy text from console window Pin
Gerry Schmitz9-Sep-19 3:58
mveGerry Schmitz9-Sep-19 3:58 
AnswerRe: Copy text from console window Pin
Sharp Ninja9-Sep-19 5:35
Sharp Ninja9-Sep-19 5:35 
GeneralRe: Copy text from console window Pin
Richard MacCutchan9-Sep-19 7:03
mveRichard MacCutchan9-Sep-19 7:03 
GeneralRe: Copy text from console window Pin
Sharp Ninja10-Sep-19 3:57
Sharp Ninja10-Sep-19 3:57 
GeneralRe: Copy text from console window Pin
Richard Deeming10-Sep-19 5:13
mveRichard Deeming10-Sep-19 5:13 
AnswerRe: Copy text from console window Pin
Gene M9-Sep-19 21:31
Gene M9-Sep-19 21:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.