0

I am using FluentNHibernate. Can anybody plz tell me how to retrieve value from database where no fields is Unique. There is not Identity column to map.

gdoron
  • 147,333
  • 58
  • 291
  • 367
Ajay
  • 1

1 Answers1

0
session.Query<Person>().Where(x => x.Name == "gdoron" &&
                                   x.Age  == "Non of your business").ToList();
gdoron
  • 147,333
  • 58
  • 291
  • 367
  • let say person class not have Identity fild. When there is Identity column the Obj references to the same ID and the last object takes the final instance value. Suppose here are database {column/value} = {1,'abc'}, {2,'xyz'}, {3,'pqr'} now while reading suppose it come across 4th object like {2,'efg}....then my List will be having total 3 objects instated of 4 and the object which hase Column=2 will take reference to Instance {2,'efg'} because it came last while loading List lists. I want to design such class which wil take total 4 elements not 3. Plz guide – Ajay May 14 '12 at 16:44