C# code generator

  • Thread starter Thread starter hardieca
  • Start date Start date
H

hardieca

Hi,

I'm looking for a tool that looks at the schema of a table and then
generates a C# class with the appropriate fields, properties, and
insert, update and delete statements. Does such a tool exist?

Regards,

Chris
 
Hello hardieca,
I'm looking for a tool that looks at the schema of a table and then
generates a C# class with the appropriate fields, properties, and
insert, update and delete statements. Does such a tool exist?

The answer to this question depends somewhat on what technologies you want
to use to access the table, and of course also where that table is to
begin with. But a general recommendation for that kind of thing is
CodeSmith, which can be used and customized to create code based on
structures read from many different database backends.


Oliver Sturm
 
I'm looking for a tool that looks at the schema of a table and then
generates a C# class with the appropriate fields, properties, and
insert, update and delete statements. Does such a tool exist?

I looked for something similar for ages, but could never find one which did
it the way I wanted it, so I wrote my own instead...
 
The framework includes objects which will do this. Take a look at
strongly typed datasets (in VS, add new item then select dataset to get
you started) and also the SqlCommandBuilder object.
There are tools that can help, but I've never found a need for them to
be honest.
 
Hello (e-mail address removed),

1) CodeSmith tool, as was already recommended.
2) MDA (Model Driven Architect) tool, like Rational Software Modeller or
Sparx Architect http://www.sparxsystems.com/platforms/mda_tool.html
I'm looking for a tool that looks at the schema of a table and then
generates a C# class with the appropriate fields, properties, and
insert, update and delete statements. Does such a tool exist?

---
WBR,
Michael Nemtsev [C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
 
Hi,

I'm looking for a tool that looks at the schema of a table and then
generates a C# class with the appropriate fields, properties, and
insert, update and delete statements. Does such a tool exist?

The future according to Microsoft for such things is LINQ. I'm pretty sure
the upgrade is a free download to get the LINQ capable compilers.
 
Hi,

I'm looking for a tool that looks at the schema of a table and then
generates a C# class with the appropriate fields, properties, and
insert, update and delete statements. Does such a tool exist?

See signature :)

FB

--
------------------------------------------------------------------------
Lead developer of LLBLGen Pro, the productive O/R mapper for .NET
LLBLGen Pro website: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------
 
LINQ you need even more code that is statement in C# 3.0 specification
perhaps.

chanmm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top