Skip to content

Commit

Permalink
Basic CRUD operations working
Browse files Browse the repository at this point in the history
  • Loading branch information
markrendle committed Oct 3, 2011
1 parent 57b7695 commit cb6782c
Show file tree
Hide file tree
Showing 155 changed files with 26,586 additions and 26,388 deletions.
12 changes: 6 additions & 6 deletions AutoTest.config
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<mm-GraphProvider>BUILTINDARK</mm-GraphProvider>
<ShouldIgnoreTestAssembly>
<Assembly>Simple.Data.Sql*.dll</Assembly>
</ShouldIgnoreTestAssembly>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<mm-GraphProvider>BUILTINDARK</mm-GraphProvider>
<ShouldIgnoreTestAssembly>
<Assembly>Simple.Data.Sql*.dll</Assembly>
</ShouldIgnoreTestAssembly>
</configuration>
18 changes: 9 additions & 9 deletions ProfilingApp/App.config
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
</configSections>
<connectionStrings>
<add name="ProfilingApp.Properties.Settings.ConnectionString"
connectionString="Data Source=.;Initial Catalog=SimpleDataProfiling;Integrated Security=true"
providerName="System.Data.SqlClient" />
</connectionStrings>
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
</configSections>
<connectionStrings>
<add name="ProfilingApp.Properties.Settings.ConnectionString"
connectionString="Data Source=.;Initial Catalog=SimpleDataProfiling;Integrated Security=true"
providerName="System.Data.SqlClient" />
</connectionStrings>
</configuration>
42 changes: 21 additions & 21 deletions ProfilingApp/FindAllByTask.cs
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
namespace ProfilingApp
{
using System;
using Simple.Data;

class FindAllByTask : IProfileTask
{
public void Run()
{
for (int i = 1; i < 101; i++)
{
GetPostAndPrintTitle(i);
}
}

private static void GetPostAndPrintTitle(int i)
{
var post = Database.OpenConnection(Properties.Settings.Default.ConnectionString).Posts.FindAllById(i).FirstOrDefault();
Console.WriteLine(post.Title);
}
}
namespace ProfilingApp
{
using System;
using Simple.Data;

class FindAllByTask : IProfileTask
{
public void Run()
{
for (int i = 1; i < 101; i++)
{
GetPostAndPrintTitle(i);
}
}

private static void GetPostAndPrintTitle(int i)
{
var post = Database.OpenConnection(Properties.Settings.Default.ConnectionString).Posts.FindAllById(i).FirstOrDefault();
Console.WriteLine(post.Title);
}
}
}
52 changes: 26 additions & 26 deletions ProfilingApp/FindByTask.cs
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ProfilingApp
{
using Simple.Data;

class FindByTask : IProfileTask
{
public void Run()
{
for (int i = 1; i < 101; i++)
{
GetPostAndPrintTitle(i);
}
}

private static void GetPostAndPrintTitle(int i)
{
var post = Database.OpenConnection(Properties.Settings.Default.ConnectionString).Posts.FindById(i);
Console.WriteLine(post.Title);
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ProfilingApp
{
using Simple.Data;

class FindByTask : IProfileTask
{
public void Run()
{
for (int i = 1; i < 101; i++)
{
GetPostAndPrintTitle(i);
}
}

private static void GetPostAndPrintTitle(int i)
{
var post = Database.OpenConnection(Properties.Settings.Default.ConnectionString).Posts.FindById(i);
Console.WriteLine(post.Title);
}
}
}
12 changes: 6 additions & 6 deletions ProfilingApp/IProfileTask.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
namespace ProfilingApp
{
interface IProfileTask
{
void Run();
}
namespace ProfilingApp
{
interface IProfileTask
{
void Run();
}
}
202 changes: 101 additions & 101 deletions ProfilingApp/ProfilingApp.csproj
Original file line number Diff line number Diff line change
@@ -1,102 +1,102 @@
<?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>{9AAF3008-8033-4A26-93D2-97928E7801E9}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ProfilingApp</RootNamespace>
<AssemblyName>ProfilingApp</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile>Client</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>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="FindAllByTask.cs" />
<Compile Include="FindByTask.cs" />
<Compile Include="IProfileTask.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
<DependentUpon>Settings.settings</DependentUpon>
</Compile>
<Compile Include="QueryWithCountTask.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Simple.Data.Ado\Simple.Data.Ado.csproj">
<Project>{ECC2D7DB-EC7F-44B6-B09F-5B471C629685}</Project>
<Name>Simple.Data.Ado</Name>
</ProjectReference>
<ProjectReference Include="..\Simple.Data.SqlServer\Simple.Data.SqlServer.csproj">
<Project>{E24F1C0F-3DCD-4BE5-9A6E-78EF6CB392A1}</Project>
<Name>Simple.Data.SqlServer</Name>
</ProjectReference>
<ProjectReference Include="..\Simple.Data\Simple.Data.csproj">
<Project>{148CEE80-2E84-4ABD-B5AB-20415B2BBD21}</Project>
<Name>Simple.Data</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<ItemGroup />
<ItemGroup>
<None Include="Resources\DatabaseResetSql.txt" />
</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>
-->
<?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>{9AAF3008-8033-4A26-93D2-97928E7801E9}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ProfilingApp</RootNamespace>
<AssemblyName>ProfilingApp</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile>Client</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>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="FindAllByTask.cs" />
<Compile Include="FindByTask.cs" />
<Compile Include="IProfileTask.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
<DependentUpon>Settings.settings</DependentUpon>
</Compile>
<Compile Include="QueryWithCountTask.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Simple.Data.Ado\Simple.Data.Ado.csproj">
<Project>{ECC2D7DB-EC7F-44B6-B09F-5B471C629685}</Project>
<Name>Simple.Data.Ado</Name>
</ProjectReference>
<ProjectReference Include="..\Simple.Data.SqlServer\Simple.Data.SqlServer.csproj">
<Project>{E24F1C0F-3DCD-4BE5-9A6E-78EF6CB392A1}</Project>
<Name>Simple.Data.SqlServer</Name>
</ProjectReference>
<ProjectReference Include="..\Simple.Data\Simple.Data.csproj">
<Project>{148CEE80-2E84-4ABD-B5AB-20415B2BBD21}</Project>
<Name>Simple.Data</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<ItemGroup />
<ItemGroup>
<None Include="Resources\DatabaseResetSql.txt" />
</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>
Loading

0 comments on commit cb6782c

Please sign in to comment.