I've an Entity named "vwAutoTaskInvoicesList", It's a view in sql server. I just want to fetch all rows in form of an IList<vwAutoTaskInvoicesList>.
This seem simple, but when I did this.
Code:
IList<vwAutoTaskInvoicesList> invoices = BaseDataProvider<vwAutoTaskInvoicesList>.GetList();
I am getting all rows but duplicate. There is field in vwAutoTaskInvoicesList called "WorkOrderID" and what I want is to fetch invoices of the given WorkOrder ID. Now, if there are 2 invoices for a given WorkOrder ID this query also fetches 2 invoices but it repeats the first one. And if there are 3 invoices it will repeat the first one 3 times. I don't know whether there is a flaw on my side or it's a bug in NHibernate. Kindly help me to overcome this problem. Thanks.