Skip to content

Commit

Permalink
added Abp.ZeroCore.EntityFramework
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan committed Oct 23, 2017
1 parent b7fbdfc commit 744f880
Show file tree
Hide file tree
Showing 11 changed files with 1,476 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<Project Sdk="Microsoft.NET.Sdk">

<Import Project="..\..\common.props" />

<PropertyGroup>
<TargetFramework>net461</TargetFramework>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<RootNamespace>Abp</RootNamespace>
<AssemblyName>Abp.ZeroCore.EntityFramework</AssemblyName>
<PackageId>Abp.ZeroCore.EntityFramework</PackageId>
<PackageTags>asp.net;asp.net mvc;boilerplate;application framework;web framework;framework;domain driven design;multitenancy;user management;role management;identity;entity framework</PackageTags>
<Description>Abp.ZeroCore.EntityFramework</Description>
</PropertyGroup>

<ItemGroup>
<None Include="bin\Release\net461\Abp.ZeroCore.EntityFramework.pdb">
<PackagePath>lib/net461/</PackagePath>
<Pack>true</Pack>
</None>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Abp.EntityFramework\Abp.EntityFramework.csproj" />
<ProjectReference Include="..\Abp.ZeroCore\Abp.ZeroCore.csproj" />
</ItemGroup>

<ItemGroup>
<Reference Include="System" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Configuration" />
<Reference Include="System.Transactions" />
</ItemGroup>

</Project>
21 changes: 21 additions & 0 deletions src/Abp.ZeroCore.EntityFramework/Data/ConnectionStringHelper.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using System.Configuration;

namespace Abp.Data
{
public static class ConnectionStringHelper
{
/// <summary>
/// Gets connection string from given connection string or name.
/// </summary>
public static string GetConnectionString(string nameOrConnectionString)
{
var connStrSection = ConfigurationManager.ConnectionStrings[nameOrConnectionString];
if (connStrSection != null)
{
return connStrSection.ConnectionString;
}

return nameOrConnectionString;
}
}
}

0 comments on commit 744f880

Please sign in to comment.