Monday, December 3, 2012

use EntityFrame work from aspx page

to use EntityFramework objects from the aspx page,
you have to:

  1. add System.Entity.Data Dll to the references of the project
  2. add your EntityFramework Dll to the references  if there is one
  3. use "using" in code behind
  4. and finally add the following section to your web.config file
<system.web>
    <compilation debug="true" targetFramework="4.0" >
      <assemblies>
        <add assembly="System.Data.Entity, Version=3.5.0.0, Culture=neutral,
        PublicKeyToken=b77a5c561934e089"/>
      </assemblies
    </compilation>
..............
</system.web>  

No comments:

Post a Comment