Today I read Fabio's post on how he sees little sense in combining non-
generic repositories with LINQ:

http://fabiomaulo.blogspot.com/2009/06/linq-and-repository.html

I was hoping to have a discussion about this. Basically, I don't
really understand where Fabio is coming from. If I have this
interface:

public interface ICustomerRepository
{
Customer GetCustomerById(string id);
IEnumerable<Customer> FindByName(string name);
void AddCustomer(Customer customer);
}

Then I have some options in regards to the implementation for
FindByName. I could use the criteria API, I could use HQL, and I could
use LINQ. There are probably some other options that I am forgetting,
but I think its fair to say that these are the three major options.

I'm a big fan of LINQ. I think its great that developers can learn one
common query language and apply it to different datasources. I see
LINQ2NH eventually replacing HQL and the criteria API in 90% of cases.
I don't understand why using LINQ to implement the FindByName method
is inappropriate. Could Fabio or someone else that understands his
point of view elaborate on this further?

Thanks!

Paul Batum
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to