Click here to Skip to main content
15,898,036 members
Articles / Programming Languages / C#

Building an Agile SQL Data Access Layer

Rate me:
Please Sign up or sign in to vote.
4.80/5 (5 votes)
6 Jan 2009CPOL4 min read 51.1K   646   58  
An article on building a SQL Server data access layer in C# in a completely separate layer.
<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>{966C71A5-E8BD-4855-A350-EC9F7FCD188C}</ProjectGuid>
    <OutputType>Library</OutputType>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>InMemoryDal.Tests</RootNamespace>
    <AssemblyName>InMemoryDal.Tests</AssemblyName>
    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
    <FileAlignment>512</FileAlignment>
    <ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
  </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="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
    <Reference Include="NLog, Version=1.0.0.505, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL" />
    <Reference Include="System" />
    <Reference Include="System.Core">
      <RequiredTargetFramework>3.5</RequiredTargetFramework>
    </Reference>
    <Reference Include="System.Data" />
    <Reference Include="System.Data.DataSetExtensions">
      <RequiredTargetFramework>3.5</RequiredTargetFramework>
    </Reference>
    <Reference Include="System.Xml" />
    <Reference Include="System.Xml.Linq">
      <RequiredTargetFramework>3.5</RequiredTargetFramework>
    </Reference>
  </ItemGroup>
  <ItemGroup>
    <Compile Include="CustomerLogicTest.cs" />
    <Compile Include="OrderLogicTest.cs" />
    <Compile Include="Properties\AssemblyInfo.cs" />
  </ItemGroup>
  <ItemGroup>
    <Content Include="AuthoringTests.txt" />
  </ItemGroup>
  <ItemGroup>
    <ProjectReference Include="..\InMemoryDal.BusinessLogic\InMemoryDal.BusinessLogic.csproj">
      <Project>{87CEABFA-0F4D-4A0D-9E44-6DAF8FE1FC3C}</Project>
      <Name>InMemoryDal.BusinessLogic</Name>
    </ProjectReference>
    <ProjectReference Include="..\InMemoryDal.Entities\InMemoryDal.Entities.csproj">
      <Project>{41F094B4-E01E-4F3A-A333-27D007FAE97C}</Project>
      <Name>InMemoryDal.Entities</Name>
    </ProjectReference>
    <ProjectReference Include="..\InMemoryDal.Helpers\InMemoryDal.Helpers.csproj">
      <Project>{53E6ED70-4808-4833-ACD5-32FB6FFEABA9}</Project>
      <Name>InMemoryDal.Helpers</Name>
    </ProjectReference>
    <ProjectReference Include="..\InMemoryDal.Interfaces\InMemoryDal.Interfaces.csproj">
      <Project>{2DD78B53-D866-469C-A24C-F964080CB2FE}</Project>
      <Name>InMemoryDal.Interfaces</Name>
    </ProjectReference>
  </ItemGroup>
  <ItemGroup>
    <Shadow Include="Test References\InMemoryDal.BusinessLogic.accessor" />
  </ItemGroup>
  <Import Project="$(MSBuildBinPath)\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 The Code Project Open License (CPOL)


Written By
Italy Italy
Software architect. At present working on C# development, with mainly Asp.net Ajax and MVC user inteface. Particularly interested in OOP, test driven, agile development.

Comments and Discussions