list=await_rep.Context.Ado.SqlQueryAsync<LogoIdentify>("select ID,PRODUCT_CODE,MATERIAL_TYPE,IS_CHECKED,RESULT,RECORD_TIME,MATERIAL_NAME from LOGO_IDENTIFY where RECORD_TIME >= @RecordTime ",new{RecordTime=DateTime.Now.AddDays(-1)});
}
elseif(time1==null)
{
list=await_rep.Context.Ado.SqlQueryAsync<LogoIdentify>("select ID,PRODUCT_CODE,MATERIAL_TYPE,IS_CHECKED,RESULT,RECORD_TIME,MATERIAL_NAME from LOGO_IDENTIFY where RECORD_TIME <= @RecordTime ",new{RecordTime=DateTime.Parse(time2)});
// list = _rep.GetList().Where(x => x.RecordTime <= DateTime.Parse(time2)).ToList();
}elseif(time2==null)
{
list=await_rep.Context.Ado.SqlQueryAsync<LogoIdentify>("select ID,PRODUCT_CODE,MATERIAL_TYPE,IS_CHECKED,RESULT,RECORD_TIME,MATERIAL_NAME from LOGO_IDENTIFY where RECORD_TIME >= @RecordTime ",new{RecordTime=DateTime.Parse(time1)});
// list = _rep.GetList().Where(x => x.RecordTime >= DateTime.Parse(time1)).ToList();
}
else
{
list=await_rep.Context.Ado.SqlQueryAsync<LogoIdentify>("select ID,PRODUCT_CODE,MATERIAL_TYPE,IS_CHECKED,RESULT,RECORD_TIME,MATERIAL_NAME from LOGO_IDENTIFY where RECORD_TIME >= @RecordTime1 AND RECORD_TIME <= @RecordTime2 ",new{RecordTime1=DateTime.Parse(time1),RecordTime2=DateTime.Parse(time2)});
// list = _rep.GetList().Where(x=>x.RecordTime >= DateTime.Parse(time1) && x.RecordTime <= DateTime.Parse(time2)).ToList();
}
list=await_rep.Context.Ado.SqlQueryAsync<LogoIdentify>("select ID,PRODUCT_CODE,MATERIAL_TYPE,IS_CHECKED,RESULT,RECORD_TIME,MATERIAL_NAME from LOGO_IDENTIFY where RECORD_TIME >= @RecordTime1 AND RECORD_TIME <= @RecordTime2 ",new{RecordTime1=time1,RecordTime2=time2});