473,396 Members | 1,861 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

C# code generator

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

Jan 10 '07 #1
7 1548
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
Jan 10 '07 #2
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
Jan 10 '07 #3
<ha******@hotmail.comwrote in message
news:11**********************@i56g2000hsf.googlegr oups.com...
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...
Jan 10 '07 #4
Hello ha******@hotmail.com,

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
Jan 10 '07 #5

<ha******@hotmail.comwrote in message
news:11**********************@i56g2000hsf.googlegr oups.com...
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

Jan 10 '07 #6
ha******@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?
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#)
------------------------------------------------------------------------
Jan 11 '07 #7
LINQ you need even more code that is statement in C# 3.0 specification
perhaps.

chanmm

"Ben Voigt" <rb*@nospam.nospamwrote in message
news:u9**************@TK2MSFTNGP02.phx.gbl...
>
<ha******@hotmail.comwrote in message
news:11**********************@i56g2000hsf.googlegr oups.com...
>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

Jan 11 '07 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

51
by: Mudge | last post by:
Please, someone, tell me why OO in PHP is better than procedural.
2
by: Dado | last post by:
Do you know where to find some peace of software/code which I can implemented in my desktop java application which will protect it from illegal using? I imagine something like: buyer can install...
0
by: Chris McKeever | last post by:
I am trying to modify the Mailman Python code to stop mapping MIME-types and use the extension of the attachment instead. I am pretty much clueless as to what I need to do here, but I think I have...
8
by: Thomas Stegen | last post by:
I have written a code generator. To be more specific it is a code generator generator. As in a generator that generates code generators. If you run the generator on its own source code you get a...
41
by: Petr Jakes | last post by:
Hello, I am trying to study/understand OOP principles using Python. I have found following code http://tinyurl.com/a4zkn about FSM (finite state machine) on this list, which looks quite useful for...
3
by: joshblair | last post by:
Hello, Has anyone ever seen or created such a code generator? I'm looking for a sample of a code generator that will generate code (preferably one that uses C# and the XMLTextWriter) to create...
29
by: Ancient_Hacker | last post by:
A while back I had to recompile some old code, originally written by a really good programmer, but one prone to use every trick in the book, and then some. There was a statement, something like...
4
by: VMI | last post by:
In the next few weeks, we'll be discussing what standards will be used for our web development, and one of the suggestions was to use a code generator (in our case, the first version of LLBLGen)....
3
by: Sander Tekelenburg | last post by:
Situation: I store news articles as individual PHP files. Each file contains HTML and now and then some embedded PHP snippets. Serving those news articles on the Web works fine, through...
5
by: james | last post by:
To give an example of what I mean I have already altered the code: def output_random_lesson_of_type(self, type=None): """Output a lesson of a specific type. If no type is passed in then output...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.