sql server - Linq query fetches different value than sql query view -
i have created view in sql server joining 3 tables , using entity framework , accessing in application.
i have following code value view table.
tapdatacontext.taptimesheetviews. where(timesheet=>timesheet.userid==userid && timesheet.workdate==dates);
this fetches duplicate values. but, sql query gives proper values.
i had referred this link here , added
[key, column(order = 0)] public long tapstartstopdataid { get; set; }
as key value. still, don't proper result when execute application.
finally, found solution used row_number() on (order id) rownum,
create new column , gave key.i deleted edmx diagram , added again new column populate there , got desired result
Comments
Post a Comment