tags:

views:

209

answers:

3

I'm looking for an ORM that will allow me to write a C# user interface and a C++ service. Both need to access data from the same database. Ideally I want C# and C++ classes to be generated from the database schema that I can then program against.

The database will probably be SQLServer, but that hasn't been decided yet.

Note: I'm doing this in a windows environment, but for reasons I don't want to go into, I can't actually use COM, so a COM solution isn't an option.

This is similar to this question:

http://stackoverflow.com/questions/482612/orm-object-relational-manager-solution-with-multiple-programming-language-suppo

However, that wasn't answered well enough, and I can't raise a bounty on it.

+2  A: 

Unfortunately this may not be of any help to you, but if you give up on trying to find a pre-build solution, it's not that terribly difficult to develop an in-house version that only supports what you need.

We have an in-house data definition language that we use to generate the SQL schema for our data, and ORM classes for native C++ and .NET. The only real trick is comparing the generated schema with what's already in the database to make migrations to the next version easier.

Eclipse
Thanks, that is very useful! We have got an in house system for generating C++ and C# classes that can be serialized into the same format. I was considering extending this system for database mappings. Before I did though, I wanted to be sure there wasn't something already suitable that would save me some time. I doesn't look like it so far.
Scott Langham
A: 

Maybe a web service?

Andrei Rinea
A: 

I don't see why it has to be a single ORM implementation that supports both languages. Why not use the best implementation for each language and make them work off the common database schema? There are plenty of good options for C#. For C++ ORM, ODB is one of the options.

Boris Kolpackov