Skip to content

Commit cccf67b

Browse files
committed
updated efcore etc.
added CanConnect method
1 parent c39c787 commit cccf67b

File tree

7 files changed

+23
-11
lines changed

7 files changed

+23
-11
lines changed

AspNetOAuth/AspNetOAuth.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
<ItemGroup>
99
<PackageReference Include="Microsoft.AspNetCore.All" />
10-
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.2.0" PrivateAssets="All" />
10+
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.2.3" PrivateAssets="All" />
1111
</ItemGroup>
1212

1313
<ItemGroup>

Example/Example.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
</PropertyGroup>
77

88
<ItemGroup>
9-
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.2.0" />
10-
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="2.2.0" />
9+
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.2.6" />
10+
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="2.2.6" />
1111
</ItemGroup>
1212

1313
<ItemGroup>

Example/Program.cs

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ class Program
1313
static void Main(string[] args)
1414
{
1515
Context db = new Context();
16+
Console.WriteLine(db.Database.CanConnect());
17+
1618
NewContext db2 = new NewContext();
1719

1820
Messurement current = new Messurement();

FileContextCore-Tests/FileContextCore-Tests.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
<ItemGroup>
1111
<PackageReference Include="Bogus" Version="27.0.1" />
12-
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.2.4" />
12+
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.2.6" />
1313
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
1414
<PackageReference Include="xunit" Version="2.4.0" />
1515
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.0" />

FileContextCore/FileContextCore.csproj

+5-5
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<SignAssembly Condition="'$(OS)' == 'Windows_NT'">true</SignAssembly>
66
<AssemblyOriginatorKeyFile>key.snk</AssemblyOriginatorKeyFile>
77
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
8-
<Version>2.2.0</Version>
8+
<Version>2.2.6</Version>
99
<Company>morrisjdev</Company>
1010
<Authors>morrisjdev</Authors>
1111
<Description>File provider for Entity Framework Core (to be used for development purposes)</Description>
@@ -19,14 +19,14 @@
1919
<PackageProjectUrl>https://github.com/morrisjdev/FileContextCore</PackageProjectUrl>
2020
<NeutralLanguage>en-US</NeutralLanguage>
2121
<DelaySign>false</DelaySign>
22-
<AssemblyVersion>2.2.0.0</AssemblyVersion>
22+
<AssemblyVersion>2.2.6.0</AssemblyVersion>
2323
</PropertyGroup>
2424

2525
<ItemGroup>
26-
<PackageReference Include="CsvHelper" Version="12.1.0" />
26+
<PackageReference Include="CsvHelper" Version="12.1.2" />
2727
<PackageReference Include="EPPlus.Core" Version="1.5.4" />
28-
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.2.0" />
29-
<PackageReference Include="Newtonsoft.Json" Version="12.0.1" />
28+
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.2.6" />
29+
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" />
3030
<PackageReference Include="Newtonsoft.Json.Bson" Version="1.0.2" />
3131
<PackageReference Include="System.Xml.XmlSerializer" Version="4.3.0" />
3232
</ItemGroup>
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<PropertyGroup>
4-
<_LastSelectedProfileId>C:\Users\mjanatzek\Documents\Projects\private\FileContextCore\FileContextCore\Properties\PublishProfiles\FolderProfile.pubxml</_LastSelectedProfileId>
4+
<_LastSelectedProfileId>C:\Users\morri\Documents\Projects\productive\FileContextCore\FileContextCore\Properties\PublishProfiles\FolderProfile.pubxml</_LastSelectedProfileId>
55
</PropertyGroup>
66
</Project>

FileContextCore/Storage/Internal/FileContextDatabaseCreator.cs

+11-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace FileContextCore.Storage.Internal
1414
/// This API supports the Entity Framework Core infrastructure and is not intended to be used
1515
/// directly from your code. This API may change or be removed in future releases.
1616
/// </summary>
17-
class FileContextDatabaseCreator : IDatabaseCreator
17+
class FileContextDatabaseCreator : IDatabaseCreatorWithCanConnect
1818
{
1919
private readonly IModel _model;
2020
private readonly IFileContextDatabase _database;
@@ -58,5 +58,15 @@ public virtual bool EnsureDeleted()
5858
/// </summary>
5959
public virtual Task<bool> EnsureCreatedAsync(CancellationToken cancellationToken = default(CancellationToken))
6060
=> Task.FromResult(_database.EnsureDatabaseCreated(_model));
61+
62+
public bool CanConnect()
63+
{
64+
return true;
65+
}
66+
67+
public Task<bool> CanConnectAsync(CancellationToken cancellationToken = new CancellationToken())
68+
{
69+
return Task.FromResult(CanConnect());
70+
}
6171
}
6272
}

0 commit comments

Comments
 (0)