-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
96f75c4
commit 06f894a
Showing
10 changed files
with
473 additions
and
472 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* text eol=lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,43 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 17 | ||
VisualStudioVersion = 17.0.31903.59 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{C41D6C7A-456B-4A0B-ACE1-9931DA092288}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Atlas.Provider.Loader", "src\Atlas.Provider.Loader\Atlas.Provider.Loader.csproj", "{003BD0CC-7AF6-408C-A40D-3FE8F6C73537}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Atlas.Provider.Core", "src\Atlas.Provider.Core\Atlas.Provider.Core.csproj", "{FAEB024F-B0AA-4B7C-A820-68E497657D0D}" | ||
EndProject | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{A0F935A4-52B6-4790-AA08-A86E0CB562E9}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Atlas.Provider.Test", "test\Atlas.Provider.Test\Atlas.Provider.Test.csproj", "{D34350D9-C254-4187-A908-00EA03DDE2B5}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{003BD0CC-7AF6-408C-A40D-3FE8F6C73537}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{003BD0CC-7AF6-408C-A40D-3FE8F6C73537}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{003BD0CC-7AF6-408C-A40D-3FE8F6C73537}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{003BD0CC-7AF6-408C-A40D-3FE8F6C73537}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{FAEB024F-B0AA-4B7C-A820-68E497657D0D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{FAEB024F-B0AA-4B7C-A820-68E497657D0D}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{FAEB024F-B0AA-4B7C-A820-68E497657D0D}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{FAEB024F-B0AA-4B7C-A820-68E497657D0D}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{D34350D9-C254-4187-A908-00EA03DDE2B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{D34350D9-C254-4187-A908-00EA03DDE2B5}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{D34350D9-C254-4187-A908-00EA03DDE2B5}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{D34350D9-C254-4187-A908-00EA03DDE2B5}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(NestedProjects) = preSolution | ||
{003BD0CC-7AF6-408C-A40D-3FE8F6C73537} = {C41D6C7A-456B-4A0B-ACE1-9931DA092288} | ||
{FAEB024F-B0AA-4B7C-A820-68E497657D0D} = {C41D6C7A-456B-4A0B-ACE1-9931DA092288} | ||
{D34350D9-C254-4187-A908-00EA03DDE2B5} = {A0F935A4-52B6-4790-AA08-A86E0CB562E9} | ||
EndGlobalSection | ||
EndGlobal | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 17 | ||
VisualStudioVersion = 17.0.31903.59 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{C41D6C7A-456B-4A0B-ACE1-9931DA092288}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Atlas.Provider.Loader", "src\Atlas.Provider.Loader\Atlas.Provider.Loader.csproj", "{003BD0CC-7AF6-408C-A40D-3FE8F6C73537}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Atlas.Provider.Core", "src\Atlas.Provider.Core\Atlas.Provider.Core.csproj", "{FAEB024F-B0AA-4B7C-A820-68E497657D0D}" | ||
EndProject | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{A0F935A4-52B6-4790-AA08-A86E0CB562E9}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Atlas.Provider.Test", "test\Atlas.Provider.Test\Atlas.Provider.Test.csproj", "{D34350D9-C254-4187-A908-00EA03DDE2B5}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{003BD0CC-7AF6-408C-A40D-3FE8F6C73537}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{003BD0CC-7AF6-408C-A40D-3FE8F6C73537}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{003BD0CC-7AF6-408C-A40D-3FE8F6C73537}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{003BD0CC-7AF6-408C-A40D-3FE8F6C73537}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{FAEB024F-B0AA-4B7C-A820-68E497657D0D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{FAEB024F-B0AA-4B7C-A820-68E497657D0D}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{FAEB024F-B0AA-4B7C-A820-68E497657D0D}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{FAEB024F-B0AA-4B7C-A820-68E497657D0D}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{D34350D9-C254-4187-A908-00EA03DDE2B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{D34350D9-C254-4187-A908-00EA03DDE2B5}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{D34350D9-C254-4187-A908-00EA03DDE2B5}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{D34350D9-C254-4187-A908-00EA03DDE2B5}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(NestedProjects) = preSolution | ||
{003BD0CC-7AF6-408C-A40D-3FE8F6C73537} = {C41D6C7A-456B-4A0B-ACE1-9931DA092288} | ||
{FAEB024F-B0AA-4B7C-A820-68E497657D0D} = {C41D6C7A-456B-4A0B-ACE1-9931DA092288} | ||
{D34350D9-C254-4187-A908-00EA03DDE2B5} = {A0F935A4-52B6-4790-AA08-A86E0CB562E9} | ||
EndGlobalSection | ||
EndGlobal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<OutputPath>..\..\artifacts\bin\$(MSBuildProjectName)\$(Configuration)\</OutputPath> | ||
<TargetFrameworks>netcoreapp2.1</TargetFrameworks> | ||
<Configuration>$(Configuration)</Configuration> | ||
|
||
<RootNamespace>Atlas.Provider.Core</RootNamespace> | ||
<Description>Entity Framework Core Command-line Tools</Description> | ||
<Nullable>enable</Nullable> | ||
<IncludeSource>false</IncludeSource> | ||
<LangVersion>latest</LangVersion> | ||
<RollForward>Major</RollForward> | ||
|
||
<IsPackable>false</IsPackable> | ||
<CheckEolTargetFramework>False</CheckEolTargetFramework> | ||
</PropertyGroup> | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<OutputPath>..\..\artifacts\bin\$(MSBuildProjectName)\$(Configuration)\</OutputPath> | ||
<TargetFrameworks>netcoreapp2.1</TargetFrameworks> | ||
<Configuration>$(Configuration)</Configuration> | ||
|
||
<RootNamespace>Atlas.Provider.Core</RootNamespace> | ||
<Description>Entity Framework Core Command-line Tools</Description> | ||
<Nullable>enable</Nullable> | ||
<IncludeSource>false</IncludeSource> | ||
<LangVersion>latest</LangVersion> | ||
<RollForward>Major</RollForward> | ||
|
||
<IsPackable>false</IsPackable> | ||
<CheckEolTargetFramework>False</CheckEolTargetFramework> | ||
</PropertyGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,64 @@ | ||
using System; | ||
using System.IO; | ||
using Atlas.Provider.Core.Executor; | ||
|
||
namespace Atlas.Provider.Core | ||
{ | ||
static class Program | ||
{ | ||
static int Main(string[] args) | ||
{ | ||
try | ||
{ | ||
var options = new Options(args); | ||
// prevent any output from being written to the console, including warn, info, error etc messages from EF Core | ||
var originalOut = Console.Out; | ||
Console.SetOut(Console.Error); | ||
using var executor = new EFDesign( | ||
options.Assembly, | ||
options.StartupAssembly, | ||
options.ProjectDir, | ||
null, | ||
options.RootNamespace, | ||
options.Language, | ||
options.Nullable, | ||
options.PositionalArgs?.ToArray() | ||
); | ||
var types = executor.GetContextTypes(); | ||
foreach (var type in types) | ||
{ | ||
if (!type.Contains("Name") || type["Name"] == null) | ||
{ | ||
continue; | ||
} | ||
var name = type["Name"]!.ToString(); | ||
if (string.IsNullOrEmpty(name)) | ||
{ | ||
continue; | ||
} | ||
var ctxInfo = executor.GetContextInfo(name); | ||
if (ctxInfo == null || !ctxInfo.Contains("ProviderName") || ctxInfo["ProviderName"] == null) | ||
{ | ||
continue; | ||
} | ||
var sql = executor.ScriptDbContext(name); | ||
Console.SetOut(originalOut); | ||
if (!string.IsNullOrEmpty(sql)) | ||
{ | ||
if (ctxInfo["ProviderName"]!.ToString()!.EndsWith("SqlServer")) | ||
{ | ||
Console.WriteLine("-- atlas:delimiter GO"); | ||
} | ||
Console.WriteLine(sql); | ||
} | ||
} | ||
return 0; | ||
} | ||
catch (Exception ex) | ||
{ | ||
Console.Error.WriteLine(ex.Message); | ||
return 1; | ||
} | ||
} | ||
} | ||
using System; | ||
using System.IO; | ||
using Atlas.Provider.Core.Executor; | ||
|
||
namespace Atlas.Provider.Core | ||
{ | ||
static class Program | ||
{ | ||
static int Main(string[] args) | ||
{ | ||
try | ||
{ | ||
var options = new Options(args); | ||
// prevent any output from being written to the console, including warn, info, error etc messages from EF Core | ||
var originalOut = Console.Out; | ||
Console.SetOut(Console.Error); | ||
using var executor = new EFDesign( | ||
options.Assembly, | ||
options.StartupAssembly, | ||
options.ProjectDir, | ||
null, | ||
options.RootNamespace, | ||
options.Language, | ||
options.Nullable, | ||
options.PositionalArgs?.ToArray() | ||
); | ||
var types = executor.GetContextTypes(); | ||
foreach (var type in types) | ||
{ | ||
if (!type.Contains("Name") || type["Name"] == null) | ||
{ | ||
continue; | ||
} | ||
var name = type["Name"]!.ToString(); | ||
if (string.IsNullOrEmpty(name)) | ||
{ | ||
continue; | ||
} | ||
var ctxInfo = executor.GetContextInfo(name); | ||
if (ctxInfo == null || !ctxInfo.Contains("ProviderName") || ctxInfo["ProviderName"] == null) | ||
{ | ||
continue; | ||
} | ||
var sql = executor.ScriptDbContext(name); | ||
Console.SetOut(originalOut); | ||
if (!string.IsNullOrEmpty(sql)) | ||
{ | ||
if (ctxInfo["ProviderName"]!.ToString()!.EndsWith("SqlServer")) | ||
{ | ||
Console.WriteLine("-- atlas:delimiter GO"); | ||
} | ||
Console.WriteLine(sql); | ||
} | ||
} | ||
return 0; | ||
} | ||
catch (Exception ex) | ||
{ | ||
Console.Error.WriteLine(ex.Message); | ||
return 1; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net6.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<PackageReference Include="JunitXml.TestLogger" Version="4.0.254" /> | ||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.0" /> | ||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.0" /> | ||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.0"> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
<PrivateAssets>all</PrivateAssets> | ||
</PackageReference> | ||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.0" /> | ||
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="8.0.0" /> | ||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="6.0.0" /> | ||
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="6.0.0" /> | ||
</ItemGroup> | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net6.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<PackageReference Include="JunitXml.TestLogger" Version="4.0.254" /> | ||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.0" /> | ||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.0" /> | ||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.0"> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
<PrivateAssets>all</PrivateAssets> | ||
</PackageReference> | ||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.0" /> | ||
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="8.0.0" /> | ||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="6.0.0" /> | ||
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="6.0.0" /> | ||
</ItemGroup> | ||
</Project> |
Oops, something went wrong.