Future starts today - you can download Eloquera 2.0 and find a new world of database programming.
Eloquera is the object database for .NET. Eloquera supports native operations with objects, SQL queries, unique object identification for stateless environments like web applications (ASP.NET).
Working with data never been easier. Add and update your object just by one line:
Adding object to the database in Eloquera.
1: Shop shop = new Shop();
2: //That stores the object and all its linked objects.
3: db.Store(shop);
Run your queries in SQL on steroids (and you can use parameters for more flexibility):
Running query for a complex object.
1: Parameters param = db.CreateParameters();
2: param["customerCountry"] = "Australia";
3:
4:
5: var complexData = db.ExecuteScalar("SELECT TOP 1 Shop" + 6: " WHERE Customer.Country = @customerCountry" +
7: " ORDER BY TotalAmount DESC", param);
And you can use joins if your objects don't have relations:
Joins in Eloquera queries.
1: var complexData = db.ExecuteQuery("SELECT school, wplace FROM School school" + 2: " INNER JOIN WorkPlace wplace" +
3: " ON ch.Location.City=wp.Location.City");
4:
5:
6: foreach(var item in complexData)
7: { 8: var pair = (IDictionary<string, object>)item;
9: Console.WriteLine("School {0} and company {1} are both located at {2}", 10: pair["school"],
11: pair["wplace"],
12: ((School)pair["school"]).Location.City);
13: }