PC Review


Reply
Thread Tools Rate Thread

C# code generator

 
 
hardieca@hotmail.com
Guest
Posts: n/a
 
      10th Jan 2007
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

 
Reply With Quote
 
 
 
 
Oliver Sturm
Guest
Posts: n/a
 
      10th Jan 2007
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
--
http://www.sturmnet.org/blog
 
Reply With Quote
 
Mark Rae
Guest
Posts: n/a
 
      10th Jan 2007
<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...

> 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...


 
Reply With Quote
 
DeveloperX
Guest
Posts: n/a
 
      10th Jan 2007
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.

hardi...@hotmail.com wrote:
> 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


 
Reply With Quote
 
Michael Nemtsev
Guest
Posts: n/a
 
      10th Jan 2007
Hello (E-Mail 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


 
Reply With Quote
 
Ben Voigt
Guest
Posts: n/a
 
      10th Jan 2007

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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.

>
> Regards,
>
> Chris
>



 
Reply With Quote
 
Frans Bouma [C# MVP]
Guest
Posts: n/a
 
      11th Jan 2007
(E-Mail Removed) wrote:

> 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#)
------------------------------------------------------------------------
 
Reply With Quote
 
Chan Ming Man
Guest
Posts: n/a
 
      11th Jan 2007
LINQ you need even more code that is statement in C# 3.0 specification
perhaps.

chanmm

"Ben Voigt" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
> <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> 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.
>
>>
>> Regards,
>>
>> Chris
>>

>
>


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Reference.map(1): Custom tool warning: DiscoCodeGenerator unable to initialize code generator. No code generated. genc ymeri Microsoft ASP .NET 0 27th Apr 2006 04:28 PM
Reference.map(1): Custom tool warning: DiscoCodeGenerator unable to initialize code generator. No code generated. genc ymeri Microsoft C# .NET 0 27th Apr 2006 04:28 PM
code generator Steph Microsoft Dot NET 0 9th Jun 2004 01:38 PM
Code Generator Me Microsoft VB .NET 4 24th Aug 2003 11:37 PM
Code generator as a VS.NET Add-In Vitaliy Microsoft Dot NET 2 26th Jul 2003 05:06 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:27 AM.