English 中文(简体)
Linq 2 Sybase ASE database? What are the options?
原标题:

I have a need to query an existing Sybase ASE database and would like to use Linq syntax for my data retrival.

I don t need write access, nor do I need the full set of Linq operators, just Select(), SelectMany(), Where(), and GroupJoin()

What are options are available?

In particular, I m wondering about nHibernate and building a new Linq2Sybase provider based on the IQ toolkit.

问题回答

You can always use ADO.NET to load your data into various collections of IEnumerable<T> and then use LINQ to Objects to query it.

This might do it. There s a free trial.

I have spent considerable time researching ORM solutions and Sybase ASE on .NET. I have not found anything free/open-source that supports Sybase ASE.

Did you manage to get NHibernate working? It doesn t look like NHibernate officially supports Sybase ASE.

These are the options I ve looked at so far:

  1. Linq2Sql -- supports SQL Server only.
  2. Microsoft Entity Framework -- support from Sybase for SQL Anywhere only, not ASE for some reason.
  3. LLBLGen Pro 3 -- costs £££ although looks very powerful.
  4. Data Direct driver -- looks like it supports Entity Framework but I think costs even more than LLBLGen Pro.
  5. NHibernate -- doesn t look like NHibernate supports Sybase ASE (http://community.jboss.org/wiki/DatabasessupportedbyNHibernate).

If anyone can suggest any sort of ORM solution on .NET for Sybase ASE, I d appreciate it!!

I have done extensive research on the overlap between .NET and Sybase ASE. Sybase released theirs ADO.NET 2.0 drivers for ASE 3 years after Oracle. Don t expect an Entity Framework provider anytime soon.

You could use Data Direct, but if your stakeholders are anything like ours, they are still sore about how much they spent on the latest round of license increases from Sybase. They aren t going to be excited about putting even more money into such an antiquated product.

The two ORM solutions currently available are LLBLGen Pro and NHibernate. Our project has successfully used NHibernate against Sybase 12.5 and 15. It works quite well for us. The current set of Sybase ASE drivers are a bit anemic, but they work just fine. We have supplemented these drivers a bit when we needed to. Tinkering with the drivers sounds hard, but its not that bad.

Update: For our purposes BLToolkit ended up being a better solution than NHibernate. Your mileage may vary.





相关问题
IEnumerable to array of parameter

Using linq? and XML is there a way to convert this IEnumerable to a string array of the value parameter? List<string> idList = new List<string>(); foreach (XElement idElement in word....

linq query for tag system - search for multiple tags

I have two tables, Tags(tagid, postid, tagname) and posts(postid, name, ...) now i want to make a query that returns me all posts that have a generic amount of tags. like: i want all posts that have ...

Linq operations against a List of Hashtables?

I m working with a set of legacy DAO code that returns an IList, where each Hashtable represents the row of a dynamically executed SQL query. For example, the List might contain the following records/...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

How to filter duplicate list items

i have list of items IList with data that looks list this: GenId TestMode 1 0 1 1 3 0 3 1 4 NULL 2 NULL i want to remove the index ...

C# Grouping/Sorting a Generic List<> using LINQ

Im looking to group and sort a Generic List<>. I have a list of objects representing files and each of these objects has a FileName, FileType and FileDate property. FileType is defined as an ...

热门标签