Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Abp.ZeroCore.EntityFramework #2625

Merged
merged 1 commit into from
Nov 14, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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;
}
}
}