Hello all,
I'm working on an ASP.NET MVC app, using linq-to-nh and soa.
Thing is, when we get the user entering serach criteria, we have the
search criteria values in the service and need to send them to the DAL
in order to use them on linq where methods and the likes. Before we
also need to verify the values aren't null or empty. Example:
we got an instance of User in our service (Name="Jon", Surname="",
Birthdate, AddressNumber...)
I would like to have a way to send Func<User, bool> to my DAL where
I'll do my Session.Linq<User>.Where(func) instead of having in my DAL
a method per search criteria (GetByName, GetByBirthdate,
GetWhereBornAfter etc').

Does this make any sense? Or would you let the DAL deal with all this
logic?
I was thinking of having a class that verifies the specified
properties aren"t null/empty and then if they're not sends back the
needed Func<T, bool> search criteria (ie user => user.Name == "Jon" &&
user.Birthdate == birthdate && user.AddressNumber == number;)

Any kind of feedback would be highly appreciated!
--~--~---------~--~----~------------~-------~--~----~
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