class from database table
-
Hey all, I was wondering if there was a utility to generate c# classes from database tables?
-
Hey all, I was wondering if there was a utility to generate c# classes from database tables?
-
Hey all, I was wondering if there was a utility to generate c# classes from database tables?
Yes, there are several. Search for "Object Relational Mapper" or "O/RM". Some that come to mind are NHibernate, SubSonic, and the ADO.NET Entity Framework.
Scott. —In just two days, tomorrow will be yesterday. —Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
[Forum Guidelines] [Articles] [Blog]
-
Yes, there are several. Search for "Object Relational Mapper" or "O/RM". Some that come to mind are NHibernate, SubSonic, and the ADO.NET Entity Framework.
Scott. —In just two days, tomorrow will be yesterday. —Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
[Forum Guidelines] [Articles] [Blog]
I've been looking at O/RM for a while. I guess I'm just looking (right now) at creating custom collection classes based of data from a database. Now, I don't want every column from the table I'm querying, just a few key columns. So basically I'm looking for a utility which will generate a class and I'll just delete what I don't need afterwards. Make sense?
-
I've been looking at O/RM for a while. I guess I'm just looking (right now) at creating custom collection classes based of data from a database. Now, I don't want every column from the table I'm querying, just a few key columns. So basically I'm looking for a utility which will generate a class and I'll just delete what I don't need afterwards. Make sense?
Yes, that makes sense. Take a look at http://SubSonic[^] as I think it will allow you to do what you want.
Scott. —In just two days, tomorrow will be yesterday. —Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
[Forum Guidelines] [Articles] [Blog]
-
Hey all, I was wondering if there was a utility to generate c# classes from database tables?
If you want to use Linq, there's always SqlMetal.
Deja View - the feeling that you've seen this post before.
-
Hey all, I was wondering if there was a utility to generate c# classes from database tables?
Generators are great until you modify the generated code, and then you are stuck maintaining it. I, of course, recommend Diamond Binding[^] for an end-to-end ORM solution. We plug into VS, and are probably the fastest to get off the ground with. (Check the example section) Subsonic use a build provider approach which is quite reasonable. Subsonic also provides some UI framework, which is either a blessing or a curse, depending on how you feel about separation of concerns. NHibernate is great, but difficult to use. Diamond Binding uses NHibernate to do the heavy lifting behind the scenes. But avoid code-generators like the plague, they tend to give you a very inflexible model, which can be difficult to extend.
Mark Churchill Director Dunn & Churchill Free Download:
Diamond Binding: The simple, powerful, reliable, and effective data layer toolkit for Visual Studio.