Greetings:
I'm trying to retrieve the Client object from the database based on the "ClientSSN" field. The customer wants to search by Social, which as a matter of design is not the PK for the Database.
Here's the query I'm using:
Code:
ICriteria criteria = session.CreateCriteria(typeof(Client));
criteria.Add(NHibernate.Expression.Expression.Eq("ClientSSN", txtClientSSN.Text));
IList client = criteria.List();
I get the following Error from the compiler (that admittedly, I don't understand and Google isn't providing much help:
Code:
Error 1 Using the generic type 'System.Collections.Generic.IList<T>' requires '1' type arguments
Finally, if there's a better way to retrieve an object from the DB where you know you will only retrieve one set of records, please let me know. In my searches, I'm not interested in retrieving more than one client at a time, I just want to load the client into the app by inputting their SSN.
Thanks in advance.