sql - Linq query does not return results but normal Query does -
i have linq query in application looks like
claim[] claimlst = (from clms in dbcontext.claims clms.@switch == 8 && (clms.status == "received ok" || clms.auto_resubmit == 1) && ((short)clms.timarkedforsubmission_m == 0 || (short)clms.timarkedforsubmission_t == 0) select clms).toarray();
when @ in sql server profiler can see gets resolved
exec sp_executesql n'select [t0].[id], [t0].[datetime_received], [t0].[uniqueid], [t0].[practice_number], [t0].[regnum], [t0].[claim_number], [t0].[status], [t0].[date_time], [t0].[action], [t0].[med_resp], [t0].[tar_resp], [t0].[switch], [t0].[auto_resubmit], [t0].[auto_resubmit_count], [t0].[timarkedforsubmission_m], [t0].[timarkedforsubmission_t] [dbo].[claims] [t0] ([t0].[switch] = @p0) , (([t0].[status] = @p1) or ([t0].[auto_resubmit] = @p2)) , ((([t0].[timarkedforsubmission_m]) = @p3) or (([t0].[timarkedforsubmission_t]) = @p4))' ,n'@p0 int,@p1 varchar(8000),@p2 int,@p3 int,@p4 int', @p0=8,@p1='received ok',@p2=1,@p3=0,@p4=0
when run sql, no results. when run query
select * dbo.claims clms clms.switch = 8 , (clms.status = 'received ok' or clms.auto_resubmit = 1) , (clms.timarkedforsubmission_m = 0 or clms.timarkedforsubmission_t = 0)
i 10 records.
what different in 2 queries 1 gives me results , other not?
Comments
Post a Comment