Click here to Skip to main content
15,889,833 members
Articles / Desktop Programming / Windows Forms

Code First: A Practical Case

Rate me:
Please Sign up or sign in to vote.
4.89/5 (19 votes)
26 Feb 2012CPOL15 min read 72.2K   3.7K   67  
A code first real life data model case
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
    <ProductVersion>8.0.30703</ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{117DC94E-1140-4529-B452-11A20D54EE5A}</ProjectGuid>
    <OutputType>WinExe</OutputType>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>Xah.MediaCataloger</RootNamespace>
    <AssemblyName>Xah.MediaCataloger</AssemblyName>
    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
    <TargetFrameworkProfile>
    </TargetFrameworkProfile>
    <FileAlignment>512</FileAlignment>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
    <PlatformTarget>x86</PlatformTarget>
    <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|x86' ">
    <PlatformTarget>x86</PlatformTarget>
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>bin\Release\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <PropertyGroup>
    <ApplicationIcon>img\gnome-multimedia.ico</ApplicationIcon>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="EntityFramework, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
      <HintPath>..\packages\EntityFramework.4.2.0.0\lib\net40\EntityFramework.dll</HintPath>
    </Reference>
    <Reference Include="System" />
    <Reference Include="System.ComponentModel.DataAnnotations" />
    <Reference Include="System.Core" />
    <Reference Include="System.Data.Entity" />
    <Reference Include="System.Web" />
    <Reference Include="System.Xml.Linq" />
    <Reference Include="System.Data.DataSetExtensions" />
    <Reference Include="Microsoft.CSharp" />
    <Reference Include="System.Data" />
    <Reference Include="System.Deployment" />
    <Reference Include="System.Drawing" />
    <Reference Include="System.Windows.Forms" />
    <Reference Include="System.Xml" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="AddFolderForm.cs">
      <SubType>Form</SubType>
    </Compile>
    <Compile Include="AddFolderForm.Designer.cs">
      <DependentUpon>AddFolderForm.cs</DependentUpon>
    </Compile>
    <Compile Include="DoubleBufferedListView.cs">
      <SubType>Component</SubType>
    </Compile>
    <Compile Include="FormatHelper.cs" />
    <Compile Include="MainForm.cs">
      <SubType>Form</SubType>
    </Compile>
    <Compile Include="MainForm.Designer.cs">
      <DependentUpon>MainForm.cs</DependentUpon>
    </Compile>
    <Compile Include="ManageFoldersForm.cs">
      <SubType>Form</SubType>
    </Compile>
    <Compile Include="ManageFoldersForm.Designer.cs">
      <DependentUpon>ManageFoldersForm.cs</DependentUpon>
    </Compile>
    <Compile Include="MediaCatalogerListView.cs">
      <SubType>Component</SubType>
    </Compile>
    <Compile Include="MediaDetail.cs">
      <SubType>UserControl</SubType>
    </Compile>
    <Compile Include="MediaDetail.Designer.cs">
      <DependentUpon>MediaDetail.cs</DependentUpon>
    </Compile>
    <Compile Include="PosterForm.cs">
      <SubType>Form</SubType>
    </Compile>
    <Compile Include="PosterForm.Designer.cs">
      <DependentUpon>PosterForm.cs</DependentUpon>
    </Compile>
    <Compile Include="ProcessFoldersForm.cs">
      <SubType>Form</SubType>
    </Compile>
    <Compile Include="ProcessFoldersForm.Designer.cs">
      <DependentUpon>ProcessFoldersForm.cs</DependentUpon>
    </Compile>
    <Compile Include="Program.cs" />
    <Compile Include="Properties\AssemblyInfo.cs" />
    <Compile Include="SearchMetaInfoForm.cs">
      <SubType>Form</SubType>
    </Compile>
    <Compile Include="SearchMetaInfoForm.Designer.cs">
      <DependentUpon>SearchMetaInfoForm.cs</DependentUpon>
    </Compile>
    <EmbeddedResource Include="AddFolderForm.resx">
      <DependentUpon>AddFolderForm.cs</DependentUpon>
      <SubType>Designer</SubType>
    </EmbeddedResource>
    <EmbeddedResource Include="MainForm.resx">
      <DependentUpon>MainForm.cs</DependentUpon>
    </EmbeddedResource>
    <EmbeddedResource Include="ManageFoldersForm.resx">
      <DependentUpon>ManageFoldersForm.cs</DependentUpon>
    </EmbeddedResource>
    <EmbeddedResource Include="MediaDetail.resx">
      <DependentUpon>MediaDetail.cs</DependentUpon>
    </EmbeddedResource>
    <EmbeddedResource Include="PosterForm.resx">
      <DependentUpon>PosterForm.cs</DependentUpon>
    </EmbeddedResource>
    <EmbeddedResource Include="ProcessFoldersForm.resx">
      <DependentUpon>ProcessFoldersForm.cs</DependentUpon>
    </EmbeddedResource>
    <EmbeddedResource Include="Properties\Resources.resx">
      <Generator>ResXFileCodeGenerator</Generator>
      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
      <SubType>Designer</SubType>
    </EmbeddedResource>
    <Compile Include="Properties\Resources.Designer.cs">
      <AutoGen>True</AutoGen>
      <DependentUpon>Resources.resx</DependentUpon>
      <DesignTime>True</DesignTime>
    </Compile>
    <EmbeddedResource Include="SearchMetaInfoForm.resx">
      <DependentUpon>SearchMetaInfoForm.cs</DependentUpon>
    </EmbeddedResource>
    <None Include="app.config" />
    <None Include="packages.config" />
    <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>
  </ItemGroup>
  <ItemGroup>
    <Content Include="img\ajax-loader.gif" />
    <Content Include="img\audio-cd_24.png" />
    <Content Include="img\file_16.png" />
    <Content Include="img\folder-add_16.png" />
    <Content Include="img\folder-delete_16.png" />
    <Content Include="img\folder-explore_16.png" />
    <Content Include="img\folder-green_16.png" />
    <Content Include="img\folder-yellow_16.png" />
    <Content Include="img\folder_24.png" />
    <Content Include="img\gnome-multimedia.ico" />
    <Content Include="img\qt1080p.png" />
    <Content Include="img\qt480p.png" />
    <Content Include="img\qt576p.png" />
    <Content Include="img\qt720p.png" />
    <Content Include="img\search_24.png" />
    <Content Include="img\stars.png" />
    <Content Include="img\stars_bw.png" />
    <Content Include="img\stats_24.png" />
    <Content Include="img\video_24.png" />
  </ItemGroup>
  <ItemGroup>
    <ProjectReference Include="..\Xah.MediaCatalogerLib\Xah.MediaCatalogerLib.csproj">
      <Project>{F49542B5-15BB-455D-8E94-D178B379B468}</Project>
      <Name>Xah.MediaCatalogerLib</Name>
    </ProjectReference>
  </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 The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
Spain Spain
I studied Telecommunication with spezialization in Sound & Image. I was always very interested in programming at university as well and that is how I earn a living.

Since some years ago, I am also succesfully involved in software architecture and design.

Comments and Discussions