c# - Rounding value in the where LINQ MVC ASP.NET -


i have query made ​​in archive of wonder how truncate value column in order make comparison:

follows script query:

var query = ies in db.tb_lv             ies.rod_id == nmrod &&                 (ies.km_i) >= vlrkmi &&                 ies.km_f <= vlrkmf &&                 ies.dt_levant == ultlev             select ies.ies; 

and values ​​of km_i km_f column decimal values ​​while vlrkmi , vlrkmf integer values.

i need truncate values ​​of km_i , km_f column query. have solution?

to truncate values ​​of km_i , km_f , need change query this.

  var query = ies in db.tb_lv                 ies.rod_id == nmrod &&                     (int) ies.km_i >= vlrkmi &&                     (int) ies.km_f <= vlrkmf &&                     ies.dt_levant == ultlev                 select ies.ies; 

Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -