Using general technique to select from tables

M

Mr. X.

Hello.
I used before the bindingSource, DataAdapter, etc. to select from table.

I need to select from any kind of database (with no select command).
Something fast (with bindingsource I need to do "filter", while the rest of
the rows are loaded before "filter", so computer works slowly).

Maybe linq solved the above (or something else), but I don't know about it,
and need some reference to a new attitude that :
1. Can do manipulation of any database.
2. Works fast.

Need samples, please.

Thanks :)
 
M

Mr. X.

Also ...
I have seen once, a way to do select (like sql select statement),
but instead of tables, it's select from objects.

I think "linq" is for that.
I would like to learn more about it.

Thanks :)
 
F

Felix Palmen

* Mr. X. said:
I have seen once, a way to do select (like sql select statement),
but instead of tables, it's select from objects.

I think "linq" is for that.
I would like to learn more about it.

You will find a lot of useful linq documentation in the MSDN. To sum it
up, linq allows you to query (using some sort of functional notation)
data from collections that implement IQueryable. A standard List<>
implements it, an Array does, too.

To use this feature with databases, there are as far as I know two
possibilities: Linq-to-Sql which implements IQueryable by directly
issuing SQL Queries through the SQL Client, and Linq-to-Entities which
provides an abstraction from the Database by introducing a new set of
"Entity" classes and objects representing the records in the database
(so it is an object-relational mapper).

I'd always prefer the latter for design reasons as it abstracts from
the database, but I assume Linq-to-Sql /could/ perform better in some
cases. Linq-to-Entities first appeared in .NET 3.5SP1.

Regards, Felix
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top