Skip to content

Commit e53bc6d

Browse files
committed
removed leaky abstraction execute from the respository
1 parent f651d76 commit e53bc6d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+5996
-116
lines changed

RevStack.SQL.csproj

+86-87
Original file line numberDiff line numberDiff line change
@@ -1,94 +1,93 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4-
<PropertyGroup>
5-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7-
<ProjectGuid>{B82ECB41-49A8-4498-9126-E368DF3CD0F6}</ProjectGuid>
8-
<OutputType>Library</OutputType>
9-
<AppDesignerFolder>Properties</AppDesignerFolder>
10-
<RootNamespace>RevStack.SQL</RootNamespace>
11-
<AssemblyName>RevStack.SQL</AssemblyName>
12-
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
13-
<FileAlignment>512</FileAlignment>
14-
<TargetFrameworkProfile />
15-
</PropertyGroup>
16-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17-
<DebugSymbols>true</DebugSymbols>
18-
<DebugType>full</DebugType>
19-
<Optimize>false</Optimize>
20-
<OutputPath>bin\Debug\</OutputPath>
21-
<DefineConstants>DEBUG;TRACE</DefineConstants>
22-
<ErrorReport>prompt</ErrorReport>
23-
<WarningLevel>4</WarningLevel>
24-
</PropertyGroup>
25-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
26-
<DebugType>pdbonly</DebugType>
27-
<Optimize>true</Optimize>
28-
<OutputPath>bin\Release\</OutputPath>
29-
<DefineConstants>TRACE</DefineConstants>
30-
<ErrorReport>prompt</ErrorReport>
31-
<WarningLevel>4</WarningLevel>
32-
</PropertyGroup>
33-
<ItemGroup>
34-
<Reference Include="Dapper, Version=1.40.0.0, Culture=neutral, processorArchitecture=MSIL">
35-
<HintPath>packages\Dapper.1.42\lib\net45\Dapper.dll</HintPath>
36-
<Private>True</Private>
37-
</Reference>
38-
<Reference Include="RevStack.Pattern, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
39-
<SpecificVersion>False</SpecificVersion>
40-
<HintPath>bin\RevStack.Pattern.dll</HintPath>
41-
</Reference>
42-
<Reference Include="ServiceStack.Common, Version=4.0.50.0, Culture=neutral, processorArchitecture=MSIL">
43-
<HintPath>packages\ServiceStack.Common.4.0.50\lib\net40\ServiceStack.Common.dll</HintPath>
44-
<Private>True</Private>
45-
</Reference>
46-
<Reference Include="ServiceStack.Interfaces, Version=4.0.0.0, Culture=neutral, PublicKeyToken=e06fbc6124f57c43, processorArchitecture=MSIL">
47-
<HintPath>packages\ServiceStack.Interfaces.4.0.50\lib\portable-wp80+sl5+net40+win8+monotouch+monoandroid+xamarin.ios10\ServiceStack.Interfaces.dll</HintPath>
48-
<Private>True</Private>
49-
</Reference>
50-
<Reference Include="ServiceStack.OrmLite, Version=4.0.50.0, Culture=neutral, processorArchitecture=MSIL">
51-
<HintPath>packages\ServiceStack.OrmLite.4.0.50\lib\net45\ServiceStack.OrmLite.dll</HintPath>
52-
<Private>True</Private>
53-
</Reference>
54-
<Reference Include="ServiceStack.OrmLite.SqlServer, Version=4.0.50.0, Culture=neutral, processorArchitecture=MSIL">
55-
<HintPath>packages\ServiceStack.OrmLite.SqlServer.4.0.50\lib\net45\ServiceStack.OrmLite.SqlServer.dll</HintPath>
56-
<Private>True</Private>
57-
</Reference>
58-
<Reference Include="ServiceStack.Text, Version=4.0.50.0, Culture=neutral, processorArchitecture=MSIL">
59-
<HintPath>packages\ServiceStack.Text.4.0.50\lib\net40\ServiceStack.Text.dll</HintPath>
60-
<Private>True</Private>
61-
</Reference>
62-
<Reference Include="System" />
63-
<Reference Include="System.ComponentModel.DataAnnotations" />
64-
<Reference Include="System.Configuration" />
65-
<Reference Include="System.Core" />
66-
<Reference Include="System.Xml.Linq" />
67-
<Reference Include="System.Data.DataSetExtensions" />
68-
<Reference Include="Microsoft.CSharp" />
69-
<Reference Include="System.Data" />
70-
<Reference Include="System.Net.Http" />
71-
<Reference Include="System.Xml" />
72-
</ItemGroup>
73-
<ItemGroup>
74-
<Compile Include="Properties\AssemblyInfo.cs" />
75-
<Compile Include="SQLDataContext.cs" />
76-
<Compile Include="SQLRepository.cs" />
77-
<Compile Include="SQLServerDataProvider.cs" />
78-
</ItemGroup>
79-
<ItemGroup>
80-
<None Include="packages.config" />
81-
</ItemGroup>
82-
<ItemGroup />
83-
<ItemGroup>
84-
<Content Include="bin\RevStack.Pattern.dll" />
85-
</ItemGroup>
86-
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{B82ECB41-49A8-4498-9126-E368DF3CD0F6}</ProjectGuid>
8+
<OutputType>Library</OutputType>
9+
<AppDesignerFolder>Properties</AppDesignerFolder>
10+
<RootNamespace>RevStack.SQL</RootNamespace>
11+
<AssemblyName>RevStack.SQL</AssemblyName>
12+
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
13+
<FileAlignment>512</FileAlignment>
14+
<TargetFrameworkProfile />
15+
</PropertyGroup>
16+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17+
<DebugSymbols>true</DebugSymbols>
18+
<DebugType>full</DebugType>
19+
<Optimize>false</Optimize>
20+
<OutputPath>bin\Debug\</OutputPath>
21+
<DefineConstants>DEBUG;TRACE</DefineConstants>
22+
<ErrorReport>prompt</ErrorReport>
23+
<WarningLevel>4</WarningLevel>
24+
</PropertyGroup>
25+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
26+
<DebugType>pdbonly</DebugType>
27+
<Optimize>true</Optimize>
28+
<OutputPath>bin\Release\</OutputPath>
29+
<DefineConstants>TRACE</DefineConstants>
30+
<ErrorReport>prompt</ErrorReport>
31+
<WarningLevel>4</WarningLevel>
32+
</PropertyGroup>
33+
<ItemGroup>
34+
<Reference Include="Dapper, Version=1.40.0.0, Culture=neutral, processorArchitecture=MSIL">
35+
<HintPath>packages\Dapper.1.42\lib\net45\Dapper.dll</HintPath>
36+
<Private>True</Private>
37+
</Reference>
38+
<Reference Include="RevStack.Pattern">
39+
<HintPath>..\RevStack.Pattern\RevStack.Pattern\bin\Release\RevStack.Pattern.dll</HintPath>
40+
</Reference>
41+
<Reference Include="ServiceStack.Common, Version=4.0.50.0, Culture=neutral, processorArchitecture=MSIL">
42+
<HintPath>packages\ServiceStack.Common.4.0.50\lib\net40\ServiceStack.Common.dll</HintPath>
43+
<Private>True</Private>
44+
</Reference>
45+
<Reference Include="ServiceStack.Interfaces, Version=4.0.0.0, Culture=neutral, PublicKeyToken=e06fbc6124f57c43, processorArchitecture=MSIL">
46+
<HintPath>packages\ServiceStack.Interfaces.4.0.50\lib\portable-wp80+sl5+net40+win8+monotouch+monoandroid+xamarin.ios10\ServiceStack.Interfaces.dll</HintPath>
47+
<Private>True</Private>
48+
</Reference>
49+
<Reference Include="ServiceStack.OrmLite, Version=4.0.50.0, Culture=neutral, processorArchitecture=MSIL">
50+
<HintPath>packages\ServiceStack.OrmLite.4.0.50\lib\net45\ServiceStack.OrmLite.dll</HintPath>
51+
<Private>True</Private>
52+
</Reference>
53+
<Reference Include="ServiceStack.OrmLite.SqlServer, Version=4.0.50.0, Culture=neutral, processorArchitecture=MSIL">
54+
<HintPath>packages\ServiceStack.OrmLite.SqlServer.4.0.50\lib\net45\ServiceStack.OrmLite.SqlServer.dll</HintPath>
55+
<Private>True</Private>
56+
</Reference>
57+
<Reference Include="ServiceStack.Text, Version=4.0.50.0, Culture=neutral, processorArchitecture=MSIL">
58+
<HintPath>packages\ServiceStack.Text.4.0.50\lib\net40\ServiceStack.Text.dll</HintPath>
59+
<Private>True</Private>
60+
</Reference>
61+
<Reference Include="System" />
62+
<Reference Include="System.ComponentModel.DataAnnotations" />
63+
<Reference Include="System.Configuration" />
64+
<Reference Include="System.Core" />
65+
<Reference Include="System.Xml.Linq" />
66+
<Reference Include="System.Data.DataSetExtensions" />
67+
<Reference Include="Microsoft.CSharp" />
68+
<Reference Include="System.Data" />
69+
<Reference Include="System.Net.Http" />
70+
<Reference Include="System.Xml" />
71+
</ItemGroup>
72+
<ItemGroup>
73+
<Compile Include="Properties\AssemblyInfo.cs" />
74+
<Compile Include="SQLDataContext.cs" />
75+
<Compile Include="SQLRepository.cs" />
76+
<Compile Include="SQLServerDataProvider.cs" />
77+
</ItemGroup>
78+
<ItemGroup>
79+
<None Include="packages.config" />
80+
</ItemGroup>
81+
<ItemGroup />
82+
<ItemGroup>
83+
<Content Include="bin\RevStack.Pattern.dll" />
84+
</ItemGroup>
85+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
8786
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
8887
Other similar extension points exist, see Microsoft.Common.targets.
8988
<Target Name="BeforeBuild">
9089
</Target>
9190
<Target Name="AfterBuild">
9291
</Target>
93-
-->
92+
-->
9493
</Project>

SQLDataContext.cs

+2-13
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@
22
using System.Collections.Generic;
33
using System.Linq;
44
using System.Data.SqlClient;
5-
using System.Configuration;
6-
using System.Data;
7-
using System.Data.Common;
8-
using System.Reflection;
9-
using System.Linq.Expressions;
5+
106

117
namespace RevStack.SQL
128
{
@@ -15,14 +11,7 @@ public class SQLDataContext
1511
private readonly SQLServerDataProvider _database;
1612

1713
public string ConnectionString { get; set; }
18-
19-
public SQLDataContext()
20-
{
21-
string connectionString = ConfigurationManager.ConnectionStrings["DefaultConnection"].ConnectionString;
22-
_database = new SQLServerDataProvider(connectionString);
23-
ConnectionString = connectionString;
24-
}
25-
14+
2615
public SQLDataContext(string connectionString)
2716
{
2817
_database = new SQLServerDataProvider(connectionString);

SQLRepository.cs

+1-6
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@
22
using System.Collections.Generic;
33
using System.Linq;
44
using System.Text;
5-
using System.Threading.Tasks;
65
using RevStack.Pattern;
76
using System.Linq.Expressions;
8-
using System.Collections.ObjectModel;
7+
98

109
namespace RevStack.SQL
1110
{
@@ -45,9 +44,5 @@ public void Delete(TEntity entity)
4544
_database.Delete<TEntity>(entity);
4645
}
4746

48-
public void Execute(string command)
49-
{
50-
_database.Execute(command);
51-
}
5247
}
5348
}

bin/Debug/Dapper.dll

118 KB
Binary file not shown.

bin/Debug/Dapper.pdb

208 KB
Binary file not shown.

0 commit comments

Comments
 (0)