By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,152 Members | 2,159 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,152 IT Pros & Developers. It's quick & easy.

Generic factoring for cross database functionality

P: n/a
Hi.

Has anyone looked into generic factoring for making database
independant applications?
(Framework 2.0)

I have, but I'm in the starting fase.

What I do know is that if you only write code, you are able to make
fairly database independant applications with not much more effort that
if you wrote ie. only against SQL Server.

BUT, and this is a big but, how on earth can we make use of all the
wizards in Visual Studio when it comes to generating datasets, the new
gridview etc. These operate only on data specific providers. Tihs
stinx. I don't want to create all my data objects in code, it's much
cleaner to drag some of them on the form designtime and set
properties...

Any views?

I can't add the components in system.data.common to the tool pallette
either...

Thanx,

Morten

Mar 30 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Hi Morton,

You could use something like NHibernate (www.nhibernate.org). With this
you can create a BO-Layer + Dal (NHibernate) that is database independend.

--
Ward Bekker
"Asp.Net Discussions for the Professional Developer"
http://www.dotnettaxi.com

"Free .Net 2.0 C# to/from VB.Net Code Converter"
http://www.dotnettaxi.com/Tools/Converter.aspx
Mar 30 '06 #2

P: n/a
"DelphiAddict" <Mo*************@edb.com> a écrit dans le message de news:
11**********************@t31g2000cwb.googlegroups. com...

| Has anyone looked into generic factoring for making database
| independant applications?
| (Framework 2.0)

Certainly, I have written a very nice OPF (Object Persistence Framework) for
..NET 2.0.

| BUT, and this is a big but, how on earth can we make use of all the
| wizards in Visual Studio when it comes to generating datasets, the new
| gridview etc. These operate only on data specific providers. Tihs
| stinx. I don't want to create all my data objects in code, it's much
| cleaner to drag some of them on the form designtime and set
| properties...

As long as you declare a wrapper class for a generic list type, then you can
use these lists as valid data sources at design time.

public class Customer
{
private string name;

public string Name
{
get { return name; }
set { name = value; }
}
...
}

public class CustomerList : List<Customer> { }

Try it.

Joanna

--
Joanna Carter [TeamB]
Consultant Software Engineer
Mar 30 '06 #3

P: n/a
Thank you very much Joanna.

The thing is: I'm an experienced developer, but quite new to C# and
..net : So I'm not quite sure how to put your tip into some real code
that helps me.
I have made a Generic helperclass for myself, and this all works fine.
The components on the component palette is all provider specific. How
do I "publish" a provider that is based on some generic code?

I can see from your previous answer that you know how to do it. I would
be VERY pleased if you could make a small dummy example for me...
Thanx,
Morten

Apr 3 '06 #4

P: n/a
"DelphiAddict" <Mo*************@edb.com> a écrit dans le message de news:
11**********************@g10g2000cwb.googlegroups. com...

| The thing is: I'm an experienced developer, but quite new to C# and
| .net : So I'm not quite sure how to put your tip into some real code
| that helps me.
| I have made a Generic helperclass for myself, and this all works fine.
| The components on the component palette is all provider specific. How
| do I "publish" a provider that is based on some generic code?
|
| I can see from your previous answer that you know how to do it. I would
| be VERY pleased if you could make a small dummy example for me...

What do you mean by publish ?

Joanna

--
Joanna Carter [TeamB]
Consultant Software Engineer
Apr 3 '06 #5

P: n/a
My original question was: I have written database independant code with
generic factoring in ado.net 2.0. I also want to work with database
independant components design time. Just drag them from the component
pallette and use them.

It seems you answered this question a few posts up. The problem is that
I didn't quite understand how to work with your answer...

That's why the post above.
I took understood your answer as you've been making components you can
use design time (And for a Delphi Developer with components I mean
components you drag from the tool pallette onto a form or datamodule)
So, is this how you have done it - or have you done it another way?

I would very much like to work with design time components - there is
so much functionality in creating things design time with these new
components. The problem is that when working with these components I
work provider spesific, which I don't want to do...

Did this help... ?

Thanx again,

Morten

Apr 4 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.