1 Replies - 566 Views - Last Post: 26 August 2011 - 04:58 AM Rate Topic: -----

#1 plejer_adam  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 90
  • Joined: 17-May 10

Better precision when taking data from DB in Entity Framework

Posted 25 August 2011 - 11:13 PM

Good morning to everyone!

I am having a problem while working with entity framework. The thing is: my column in DB (NETRevenue) is float with 6 places precision, and when EF loads data from DB that column becomes Double with 1 or 2 decimal places precision and that is a big problem for me.. I need all 6 places !!

Anyone can help me to solve this , thank you very much !
Is This A Good Question/Topic? 0
  • +

Replies To: Better precision when taking data from DB in Entity Framework

#2 eclipsed4utoo  Icon User is offline

  • Not Your Ordinary Programmer
  • member icon

Reputation: 1524
  • View blog
  • Posts: 5,957
  • Joined: 21-March 08

Re: Better precision when taking data from DB in Entity Framework

Posted 26 August 2011 - 04:58 AM

Why is your database field a float? If you require decimal places, then it should be the decimal datatype.

http://blog.sqlautho...at-and-numeric/
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1