Linq to Entity get a Date from DateTime

前端 未结 3 1829
别跟我提以往
别跟我提以往 2021-01-17 17:22

var islemList = (from isl in entities.Islemler where (isl.KayitTarihi.Date >= dbas && isl.KayitTarihi.Value.Date <= dbit) selec

3条回答
  •  灰色年华
    2021-01-17 18:22

    if KayitTarihi is a date column in DB (and dbas and dbit are DateTime), use:

    var islemList = (from isl in entities.Islemler where (isl.KayitTarihi >= dbas && isl.KayitTarihi <= dbit) select isl);
    

提交回复
热议问题