Click here to Skip to main content
15,891,248 members
Articles / Programming Languages / C#

ADO.NET for the Object-Oriented Programmer – Part Two

Rate me:
Please Sign up or sign in to vote.
4.96/5 (61 votes)
19 Jan 2006CPOL28 min read 338.1K   3.5K   240  
In this second part of the article series, we will revisit the ADO.NET CRUD operations. Only this time, we will use an application with far better architecture. Once that is done, we will move on to data binding with objects.
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProductVersion>8.0.50727</ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{3866794A-9334-41E0-8D71-1DF720DEE3E6}</ProjectGuid>
    <OutputType>WinExe</OutputType>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>ObjectDataBinding</RootNamespace>
    <AssemblyName>ObjectDataBinding</AssemblyName>
  </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.ReportViewer.Common, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
    <Reference Include="Microsoft.ReportViewer.WinForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
    <Reference Include="System" />
    <Reference Include="System.Data" />
    <Reference Include="System.Deployment" />
    <Reference Include="System.Drawing" />
    <Reference Include="System.Web" />
    <Reference Include="System.Web.Services" />
    <Reference Include="System.Windows.Forms" />
    <Reference Include="System.Xml" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="Base Classes\FSBindingItem.cs" />
    <Compile Include="Base Classes\FSBindingList.cs" />
    <Compile Include="Base Classes\FSPropertyComparer.cs" />
    <Compile Include="Controller\AppController.cs" />
    <Compile Include="Controller\Command.cs" />
    <Compile Include="Controller\CommandCreateAuthor.cs" />
    <Compile Include="Controller\CommandCreateBook.cs" />
    <Compile Include="Controller\CommandDeleteAuthor.cs" />
    <Compile Include="Controller\CommandDeleteBook.cs" />
    <Compile Include="Controller\CommandGetAuthors.cs" />
    <Compile Include="Controller\CommandUpdateAuthor.cs" />
    <Compile Include="Controller\CommandUpdateBook.cs" />
    <Compile Include="DataAccess\AuthorItemDAO.cs" />
    <Compile Include="DataAccess\AuthorListDAO.cs" />
    <Compile Include="DataAccess\BookItemDAO.cs" />
    <Compile Include="DataAccess\BookListDAO.cs" />
    <Compile Include="DataAccess\DataProvider.cs" />
    <Compile Include="Model\AuthorItem.cs" />
    <Compile Include="Model\AuthorList.cs" />
    <Compile Include="Model\BookItem.cs" />
    <Compile Include="Model\BookList.cs" />
    <Compile Include="Program.cs" />
    <Compile Include="Properties\AssemblyInfo.cs" />
    <EmbeddedResource Include="Reports\BooksSubreport.rdlc" />
    <EmbeddedResource Include="Properties\Resources.resx">
      <Generator>ResXFileCodeGenerator</Generator>
      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
      <SubType>Designer</SubType>
    </EmbeddedResource>
    <EmbeddedResource Include="Reports\AuthorsReport.rdlc" />
    <EmbeddedResource Include="View\FormMain.resx">
      <SubType>Designer</SubType>
      <DependentUpon>FormMain.cs</DependentUpon>
    </EmbeddedResource>
    <EmbeddedResource Include="View\FormReport.resx">
      <SubType>Designer</SubType>
      <DependentUpon>FormReport.cs</DependentUpon>
    </EmbeddedResource>
    <Compile Include="Properties\Resources.Designer.cs">
      <AutoGen>True</AutoGen>
      <DependentUpon>Resources.resx</DependentUpon>
      <DesignTime>True</DesignTime>
    </Compile>
    <None Include="app.config" />
    <None Include="Properties\DataSources\ObjectDataBinding.Model.AuthorList.datasource" />
    <None Include="Properties\DataSources\ObjectDataBinding.Model.BookList.datasource" />
    <None Include="Properties\Settings.settings">
      <Generator>SettingsSingleFileGenerator</Generator>
      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
    </None>
    <Compile Include="Properties\Settings.Designer.cs">
      <AutoGen>True</AutoGen>
      <DependentUpon>Settings.settings</DependentUpon>
      <DesignTimeSharedInput>True</DesignTimeSharedInput>
    </Compile>
    <Compile Include="View\FormMain.cs">
      <SubType>Form</SubType>
    </Compile>
    <Compile Include="View\FormMain.Designer.cs">
      <DependentUpon>FormMain.cs</DependentUpon>
    </Compile>
    <Compile Include="View\FormReport.cs">
      <SubType>Form</SubType>
    </Compile>
    <Compile Include="View\FormReport.Designer.cs">
      <DependentUpon>FormReport.cs</DependentUpon>
    </Compile>
  </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
Software Developer (Senior) Foresight Systems
United States United States
David Veeneman is a financial planner and software developer. He is the author of "The Fortune in Your Future" (McGraw-Hill 1998). His company, Foresight Systems, develops planning and financial software.

Comments and Discussions