Click here to Skip to main content
15,893,814 members
Articles / Programming Languages / C#

ADO.NET Entity Framework as Data Access Layer

Rate me:
Please Sign up or sign in to vote.
4.19/5 (12 votes)
30 Oct 2009Public Domain2 min read 106.4K   4.3K   75  
ADO.NET Entity Framework as Data Access Layer
  • dataaccesslayer.zip
    • DataAccessLayer
      • App.Config
      • bin
        • Debug
      • CustomerDbOperation.cs
      • DataAccessLayer.csproj
      • DataAccessLayerTestProject
      • IDatabaseOperation.cs
      • LocalTestRun.testrunconfig
      • Properties
      • TestModel.Designer.cs
      • TestModel.edmx
      • TestResults
        • Sarvesh_HOME 2009-10-28 23_49_27.trx
        • Sarvesh_HOME 2009-10-28 23_49_27
        • Sarvesh_HOME 2009-10-29 07_57_49.trx
        • Sarvesh_HOME 2009-10-29 07_57_49
        • Sarvesh_HOME 2009-10-29 08_35_04.trx
        • Sarvesh_HOME 2009-10-29 08_35_04
        • Sarvesh_HOME 2009-10-29 08_40_21.trx
        • Sarvesh_HOME 2009-10-29 08_40_21
        • Sarvesh_HOME 2009-10-29 08_42_11.trx
        • Sarvesh_HOME 2009-10-29 08_42_11
        • Sarvesh_HOME 2009-10-29 08_42_32.trx
        • Sarvesh_HOME 2009-10-29 08_42_32
        • Sarvesh_HOME 2009-10-29 09_07_25.trx
        • Sarvesh_HOME 2009-10-29 09_07_25
        • Sarvesh_HOME 2009-10-29 09_07_58.trx
        • Sarvesh_HOME 2009-10-29 09_07_58
        • Sarvesh_HOME 2009-10-29 09_08_43.trx
        • Sarvesh_HOME 2009-10-29 09_08_43
        • Sarvesh_HOME 2009-10-29 09_09_25.trx
        • Sarvesh_HOME 2009-10-29 09_09_25
        • Sarvesh_HOME 2009-10-29 09_14_55.trx
        • Sarvesh_HOME 2009-10-29 09_14_55
        • Sarvesh_HOME 2009-10-29 09_22_35.trx
        • Sarvesh_HOME 2009-10-29 09_22_35
        • Sarvesh_HOME 2009-10-29 09_46_03.trx
        • Sarvesh_HOME 2009-10-29 09_46_03
        • Sarvesh_HOME 2009-10-29 09_48_41.trx
        • Sarvesh_HOME 2009-10-29 09_48_41
        • Sarvesh_HOME 2009-10-29 09_48_58.trx
        • Sarvesh_HOME 2009-10-29 09_48_58
        • Sarvesh_HOME 2009-10-29 09_49_05.trx
        • Sarvesh_HOME 2009-10-29 09_49_05
        • Sarvesh_HOME 2009-10-29 09_49_38.trx
        • Sarvesh_HOME 2009-10-29 09_49_38
        • Sarvesh_HOME 2009-10-29 09_57_25.trx
        • Sarvesh_HOME 2009-10-29 09_57_25
        • Sarvesh_HOME 2009-10-29 10_03_07.trx
        • Sarvesh_HOME 2009-10-29 10_03_07
        • Sarvesh_HOME 2009-10-29 10_03_31.trx
        • Sarvesh_HOME 2009-10-29 10_03_31
        • Sarvesh_HOME 2009-10-29 10_04_15.trx
        • Sarvesh_HOME 2009-10-29 10_04_15
        • Sarvesh_HOME 2009-10-29 10_04_56.trx
        • Sarvesh_HOME 2009-10-29 10_04_56
        • Sarvesh_HOME 2009-10-29 10_06_14.trx
        • Sarvesh_HOME 2009-10-29 10_06_14
        • Sarvesh_HOME 2009-10-29 10_07_36.trx
        • Sarvesh_HOME 2009-10-29 10_07_36
        • Sarvesh_HOME 2009-10-29 10_07_50.trx
        • Sarvesh_HOME 2009-10-29 10_07_50
      • WCFADOEF.sln
      • WCFADOEF.suo
      • WCFADOEF.vsmdi
    • databaseScript
    • imgs
      • pic1.JPG
      • pic2.JPG
      • pic3.JPG
      • pic4.JPG
      • pic5.JPG
      • pic6.JPG
      • Thumbs.db
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProductVersion>9.0.30729</ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{865BB948-CD33-403B-93FA-5B0346CE7CBE}</ProjectGuid>
    <OutputType>Library</OutputType>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>DataAccessLayer</RootNamespace>
    <AssemblyName>DataAccessLayer</AssemblyName>
    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
    <FileAlignment>512</FileAlignment>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>bin\Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>bin\Release\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="System" />
    <Reference Include="System.Core">
      <RequiredTargetFramework>3.5</RequiredTargetFramework>
    </Reference>
    <Reference Include="System.Data.Entity">
      <RequiredTargetFramework>3.5</RequiredTargetFramework>
    </Reference>
    <Reference Include="System.Runtime.Serialization">
      <RequiredTargetFramework>3.0</RequiredTargetFramework>
    </Reference>
    <Reference Include="System.Security" />
    <Reference Include="System.Xml.Linq">
      <RequiredTargetFramework>3.5</RequiredTargetFramework>
    </Reference>
    <Reference Include="System.Data.DataSetExtensions">
      <RequiredTargetFramework>3.5</RequiredTargetFramework>
    </Reference>
    <Reference Include="System.Data" />
    <Reference Include="System.Xml" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="CustomerDbOperation.cs" />
    <Compile Include="IDatabaseOperation.cs" />
    <Compile Include="Properties\AssemblyInfo.cs" />
    <Compile Include="TestModel.Designer.cs">
      <AutoGen>True</AutoGen>
      <DesignTime>True</DesignTime>
      <DependentUpon>TestModel.edmx</DependentUpon>
    </Compile>
  </ItemGroup>
  <ItemGroup>
    <EntityDeploy Include="TestModel.edmx">
      <Generator>EntityModelCodeGenerator</Generator>
      <LastGenOutput>TestModel.Designer.cs</LastGenOutput>
    </EntityDeploy>
  </ItemGroup>
  <ItemGroup>
    <None Include="App.Config" />
  </ItemGroup>
  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
       Other similar extension points exist, see Microsoft.Common.targets.
  <Target Name="BeforeBuild">
  </Target>
  <Target Name="AfterBuild">
  </Target>
  -->
</Project>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under A Public Domain dedication


Written By
Architect
India India
Sarvesh Upadhyay is Technical Architect in Microsoft Technologies with 12 yrs of hands on experience on various domain like CRM, CMS, Inventory Management System, Telecome Billing, E-Commerce application, Retail etc.
He has indepth knowledge on Design Patterns, Asp.Net MVC, MVP , C#, JavaScript, Knockout, MS-SQL Server,Web Services,Web API, MSMQ, Saleslogix CRM, etc.

Comments and Discussions