13098

entity framework 6 dbfunctions not available

Question:

I installed EF 6 in a DAL class library but I can get it work DbFunctions.TruncateTime, when I add the reference to System.Data.Entity and build the solution still appearing the message: The type or namespace name 'DbFunctions' does not exist in the namespace 'System.Data.Entity' (are you missing an assembly reference?) .

Help... I need to compare dates !!!

Answer1:

I think the dbfunctions actually reside in EntityFramework.dll, add a reference to EntityFramework and you should be right.

<a href="https://msdn.microsoft.com/en-us/library/system.data.entity.dbfunctions%28v=vs.113%29.aspx" rel="nofollow">https://msdn.microsoft.com/en-us/library/system.data.entity.dbfunctions%28v=vs.113%29.aspx</a>

States in here the assembly is entityframework too.

Recommend

  • Why can't I request promo codes for my iOS app?
  • Unable to run SDL program in Eclipse but able to do so in Windows Explorer
  • C++ Coin flip program error
  • string.IsNullOrEmpty() Doesn't Seem to Work on a String within a Class within a Class
  • How do you remove the JComboBox 'click and see dropdown' functionality?
  • c++ regex_replace not doing intended substitution
  • Doctrine/Symfony entity generator and generating entity from one table
  • WPF Template Binding in ToggleButton UserControl
  • using System.Speech.Synthesis with Windows10 universal app (XAML-C#)
  • Why cepheus don't send int without quotes to orion?
  • GAE: Way to get reference to an HttpSession from its ID?
  • Spring boot 2.0.0.M4 required a bean named 'entityManagerFactory' that could not be found
  • Eliminate partial duplicate rows from result set
  • What is the purpose of TaskExecutor in spring?
  • Force show.bind execution
  • NHibernate Validation Localization with S#arp Architecture
  • Installing Hadoop, Java Exception about illegal characters at index 7?
  • How can I send an e-mail from a vbs script
  • Accessing IRQ description array within a module and displaying action names
  • Excel - Autoshape get it's name from cell (value)
  • Check if a string to interpolate provides expected placeholders
  • Convert array of 8 bytes to signed long in C++
  • Timeout for blocking function call, i.e., how to stop waiting for user input after X seconds?
  • RestKit - RKRequestDelegate does not exist
  • Traverse Array and Display in markup
  • Windows forms listbox.selecteditem displaying “System.Data.DataRowView” instead of actual value
  • Proper folder structure for lots of source files
  • How can I get HTML syntax highlighting in my editor for CakePHP?
  • -fvisibility=hidden not passed by compiler for Debug builds
  • How do I configure my settings file to work with unit tests?
  • Getting Messege Twice Using IMvxMessenger
  • embed rChart in Markdown
  • How does Linux kernel interrupt the application?
  • IndexOutOfRangeException on multidimensional array despite using GetLength check
  • Checking variable from a different class in C#
  • How to get NHibernate ISession to cache entity not retrieved by primary key
  • Binding checkboxes to object values in AngularJs
  • How can I use `wmic` in a Windows PE script?
  • Unable to use reactive element in my shiny app
  • Net Present Value in Excel for Grouped Recurring CF