Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Suggest a simple ORM on .NET - design for maintaining legacy apps

I am assigned to maintain a bunch of legacy apps with heavy stored procedure usage built before '05 when there was no ORM. The developers who work with me don't know Entity Framework nor LINQ and are not eager to learn.

Is there any ORM on .NET that provides a simple object interface to existing database tables and perhaps stored procedures?

I am quite happy if it enables me to code a few lines to get a class to each table, and it has properties corresponding to data in each column and some methods or properties to resolve foreign key relationship / many-to-many relationship - forward and reverse.

For example, saving one employee and department record

Employee e = new Employee("John", null);
Department d = new Department("QA");
d.save();
e.department = d;
e.save();

without writing INSERT SQL statements.

EDIT: I am using MS SQL Server 2008

like image 865
kakarukeys Avatar asked May 20 '11 17:05

kakarukeys


2 Answers

Have a look at Rob Conery's Massive. It's simple and appears easy to use. It looks like it requires .NET 4, though.

like image 198
SquidScareMe Avatar answered Oct 01 '22 11:10

SquidScareMe


SubSonic is fairly easy to use. LINQ to SQL is a good choice too. Also, take a look at http://www.codeproject.com/KB/database/LightORMLibrary.aspx.

like image 34
Kamyar Avatar answered Oct 01 '22 11:10

Kamyar