Click here to Skip to main content
14,298,693 members
   

C#

 
GeneralRe: What is the best way to create your Database (tables..etc) using C# ? Pin
Abdalla Ben Omran10-Sep-19 5:19
memberAbdalla Ben Omran10-Sep-19 5:19 
AnswerRe: What is the best way to create your Database (tables..etc) using C# ? Pin
Gerry Schmitz10-Sep-19 6:02
mveGerry Schmitz10-Sep-19 6:02 
AnswerRe: What is the best way to create your Database (tables..etc) using C# ? Pin
MadMyche10-Sep-19 8:36
mveMadMyche10-Sep-19 8:36 
QuestionRe: What is the best way to create your Database (tables..etc) using C# ? Pin
Maciej Los10-Sep-19 20:46
protectorMaciej Los10-Sep-19 20:46 
AnswerRe: What is the best way to create your Database (tables..etc) using C# ? Pin
Abdalla Ben Omran10-Sep-19 21:57
memberAbdalla Ben Omran10-Sep-19 21:57 
GeneralRe: What is the best way to create your Database (tables..etc) using C# ? Pin
Maciej Los10-Sep-19 22:00
protectorMaciej Los10-Sep-19 22:00 
GeneralRe: What is the best way to create your Database (tables..etc) using C# ? Pin
Abdalla Ben Omran10-Sep-19 22:16
memberAbdalla Ben Omran10-Sep-19 22:16 
AnswerRe: What is the best way to create your Database (tables..etc) using C# ? Pin
MadMyche11-Sep-19 1:43
mveMadMyche11-Sep-19 1: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 1:59
protectorMaciej Los11-Sep-19 1:59 
GeneralRe: What is the best way to create your Database (tables..etc) using C# ? Pin
MadMyche11-Sep-19 3:50
mveMadMyche11-Sep-19 3:50 
Generallaziness is a reason for progress Pin
Maciej Los11-Sep-19 4:03
protectorMaciej Los11-Sep-19 4:03 
GeneralRe: laziness is a reason for progress Pin
MadMyche11-Sep-19 4:10
mveMadMyche11-Sep-19 4:10 
GeneralRe: What is the best way to create your Database (tables..etc) using C# ? Pin
Mycroft Holmes11-Sep-19 13:48
memberMycroft Holmes11-Sep-19 13:48 
AnswerRe: What is the best way to create your Database (tables..etc) using C# ? Pin
C. David Johnson13-Sep-19 7:51
memberC. David Johnson13-Sep-19 7:51 
AnswerRe: What is the best way to create your Database (tables..etc) using C# ? Pin
Jörgen Andersson13-Sep-19 7:52
protectorJörgen Andersson13-Sep-19 7:52 
QuestionCopy text from console window Pin
Gene M9-Sep-19 1:01
memberGene M9-Sep-19 1:01 
AnswerRe: Copy text from console window Pin
Richard MacCutchan9-Sep-19 1:46
protectorRichard MacCutchan9-Sep-19 1:46 
AnswerRe: Copy text from console window Pin
OriginalGriff9-Sep-19 1:46
protectorOriginalGriff9-Sep-19 1:46 
AnswerRe: Copy text from console window Pin
Gerry Schmitz9-Sep-19 2:58
mveGerry Schmitz9-Sep-19 2:58 
AnswerRe: Copy text from console window Pin
Sharp Ninja9-Sep-19 4:35
memberSharp Ninja9-Sep-19 4:35 
GeneralRe: Copy text from console window Pin
Richard MacCutchan9-Sep-19 6:03
protectorRichard MacCutchan9-Sep-19 6:03 
GeneralRe: Copy text from console window Pin
Sharp Ninja10-Sep-19 2:57
memberSharp Ninja10-Sep-19 2:57 
GeneralRe: Copy text from console window Pin
Richard Deeming10-Sep-19 4:13
mveRichard Deeming10-Sep-19 4:13 
AnswerRe: Copy text from console window Pin
Gene M9-Sep-19 20:31
memberGene M9-Sep-19 20:31 
GeneralRe: Copy text from console window Pin
Richard MacCutchan9-Sep-19 21:16
protectorRichard MacCutchan9-Sep-19 21:16 

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.