Register and join over 40,000 other developers!
Recent Topics
-
The Game You Are Waiting For?
WendellHarper - Dec 06 2020 01:21 PM
-
Quora and Reddit Backlinks
WendellHarper - Dec 06 2020 01:14 PM
-
Delete account
pindo - Jul 23 2020 01:33 AM
-
Print specific values from dictionary with a specific key name
Siten0308 - Jun 20 2019 01:43 PM
-
Learn algorithms and programming concepts
johnnylo - Apr 23 2019 07:49 AM
Recent Blog Entries
Recent Status Updates
Popular Tags
- networking
- Managed C++
- stream
- console
- database
- authentication
- Visual Basic 4 / 5 / 6
- session
- Connection
- asp.net
- import
- syntax
- hardware
- html5
- array
- mysql
- java
- php
- c++
- string
- C#
- html
- loop
- timer
- jquery
- ajax
- javascript
- programming
- android
- css
- assembly
- c
- form
- vb.net
- xml
- linked list
- login
- encryption
- pseudocode
- calculator
- sql
- python
- setup
- help
- game
- combobox
- binary
- hello world
- grid
- innerHTML

Access 2010 - A Better Way To Generate Classes?
Started by SoulFireMage, Jun 06 2012 11:20 AM
EF ADO sql database
3 replies to this topic
#1
Posted 06 June 2012 - 11:20 AM
Hi guys,
I've got a problem that I keep going round in circles with and I'm a bit fedup of it.
Im' stuck with MS Access 2010 for a content database. The db is used locally on 400 pcs and cannot be swapped for a real database for various legacy reasons. So any tools I want for developing content have to talk to Access 2010 and that's it.
Now I've upscaled it twice to Denali and SQL server 2008. I learnt how to play with Entity Framework to a simple level, meaning I can get a nice LINQable list out of it. I've a fair few tables and columns to update and work on.
However, in real life, my toy EF projects can't go further because it's back to handcrafting the data layer all over again. All the while knowing that there is definitely somehow, better ways than manually writing the classes and making sure the column name and class property name are the same.
We did have a code generator, not written by me, but sadly it was built to bind Winforms directly to it and the source isn't in my control and not kept up to date. So no PK detection, relies on convention only for ID etc.
So at the end of all that and having just run through a quick look at NHibernate, can anyone suggest a way to do this that doesn't involve hours of hand crafted classes for each table? I should add that its an in house content editor, not a client facing tool.
Thanks for any advice offered!
I've got a problem that I keep going round in circles with and I'm a bit fedup of it.
Im' stuck with MS Access 2010 for a content database. The db is used locally on 400 pcs and cannot be swapped for a real database for various legacy reasons. So any tools I want for developing content have to talk to Access 2010 and that's it.
Now I've upscaled it twice to Denali and SQL server 2008. I learnt how to play with Entity Framework to a simple level, meaning I can get a nice LINQable list out of it. I've a fair few tables and columns to update and work on.
However, in real life, my toy EF projects can't go further because it's back to handcrafting the data layer all over again. All the while knowing that there is definitely somehow, better ways than manually writing the classes and making sure the column name and class property name are the same.
We did have a code generator, not written by me, but sadly it was built to bind Winforms directly to it and the source isn't in my control and not kept up to date. So no PK detection, relies on convention only for ID etc.
So at the end of all that and having just run through a quick look at NHibernate, can anyone suggest a way to do this that doesn't involve hours of hand crafted classes for each table? I should add that its an in house content editor, not a client facing tool.
Thanks for any advice offered!
#2
Posted 06 June 2012 - 08:07 PM
did you hear about codesmith ?
it read the database tables and fields and make up your classes, you can also template how do you want the classes to look like:
here the site :
http://www.codesmithtools.com/
there is many code generators, but i've seen this one working at large scale so i trust it.
it read the database tables and fields and make up your classes, you can also template how do you want the classes to look like:
here the site :
http://www.codesmithtools.com/
there is many code generators, but i've seen this one working at large scale so i trust it.
#3
Posted 06 June 2012 - 10:25 PM
This looks exciting! On iPad just now, will look later today in depth but if it can handle our access db I'll owe you a beer!
Very much appreciated, this is the sort of thing I'm needing. My own code was getting rubbish, I've only a loose grasp of using interfaces or even using properties properly-despite knowing the theory!
Very much appreciated, this is the sort of thing I'm needing. My own code was getting rubbish, I've only a loose grasp of using interfaces or even using properties properly-despite knowing the theory!
#4
Posted 07 June 2012 - 12:56 PM
hiya again soulfire,
man, do i like beer ! best recon ever ! ** with likes,+1, etc, beer is the deal !!
i think it will not have trouble reading your access db provided you pass it by odbc, codesmith is good at reading tables and making the classes, DALC, business, etc
it also would make the stored procedures for basic operations as Adding, erasing and modifying records should you be working in sql server.
i hope it does the trick for you, make me know how it goes
man, do i like beer ! best recon ever ! ** with likes,+1, etc, beer is the deal !!
i think it will not have trouble reading your access db provided you pass it by odbc, codesmith is good at reading tables and making the classes, DALC, business, etc
it also would make the stored procedures for basic operations as Adding, erasing and modifying records should you be working in sql server.
i hope it does the trick for you, make me know how it goes
Also tagged with one or more of these keywords: EF, ADO, sql, database
General Forums →
Game Development →
Include a specific error, task, problem, or question in your titleStarted by Killuah, 04 Jul 2018 ![]() |
|
![]() |
||
Language Forums →
Other Languages →
ASP, ASP.NET and Coldfusion →
Dynamic controls and asp:button postbackStarted by Tchpowdog, 12 Jun 2016 ![]() |
|
![]() |
||
Language Forums →
Databases →
Sql database flagged as suspectStarted by perkins, 10 Apr 2016 ![]() |
|
![]() |
||
Language Forums →
Databases →
SOLVED: Conditional insertion of rows via MySQLStarted by PuddingEatsPanda, 19 Mar 2016 ![]() |
|
![]() |
||
General Forums →
General Programming →
sql database 2008Started by rhysgardner, 31 Jan 2016 ![]() |
|
![]() |
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download