This commit is contained in:
Родитель
29af9cec22
Коммит
556f1d376b
|
@ -9,6 +9,7 @@ To change this file edit the source file and then run MarkdownSnippets.
|
||||||
|
|
||||||
[![Build status](https://ci.appveyor.com/api/projects/status/g6njwv0aox62atu0?svg=true)](https://ci.appveyor.com/project/SimonCropp/verify-entityframework)
|
[![Build status](https://ci.appveyor.com/api/projects/status/g6njwv0aox62atu0?svg=true)](https://ci.appveyor.com/project/SimonCropp/verify-entityframework)
|
||||||
[![NuGet Status](https://img.shields.io/nuget/v/Verify.EntityFramework.svg)](https://www.nuget.org/packages/Verify.EntityFramework/)
|
[![NuGet Status](https://img.shields.io/nuget/v/Verify.EntityFramework.svg)](https://www.nuget.org/packages/Verify.EntityFramework/)
|
||||||
|
[![NuGet Status](https://img.shields.io/nuget/v/Verify.EntityFrameworkClassic.svg)](https://www.nuget.org/packages/Verify.EntityFrameworkClassic/)
|
||||||
|
|
||||||
Extends [Verify](https://github.com/SimonCropp/Verify) to allow verification of EntityFramework bits.
|
Extends [Verify](https://github.com/SimonCropp/Verify) to allow verification of EntityFramework bits.
|
||||||
|
|
||||||
|
@ -25,7 +26,8 @@ Support is available via a [Tidelift Subscription](https://tidelift.com/subscrip
|
||||||
|
|
||||||
## NuGet package
|
## NuGet package
|
||||||
|
|
||||||
https://nuget.org/packages/Verify.EntityFramework/
|
* https://nuget.org/packages/Verify.EntityFramework/
|
||||||
|
* https://nuget.org/packages/Verify.EntityFrameworkClassic/
|
||||||
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
[![Build status](https://ci.appveyor.com/api/projects/status/g6njwv0aox62atu0?svg=true)](https://ci.appveyor.com/project/SimonCropp/verify-entityframework)
|
[![Build status](https://ci.appveyor.com/api/projects/status/g6njwv0aox62atu0?svg=true)](https://ci.appveyor.com/project/SimonCropp/verify-entityframework)
|
||||||
[![NuGet Status](https://img.shields.io/nuget/v/Verify.EntityFramework.svg)](https://www.nuget.org/packages/Verify.EntityFramework/)
|
[![NuGet Status](https://img.shields.io/nuget/v/Verify.EntityFramework.svg)](https://www.nuget.org/packages/Verify.EntityFramework/)
|
||||||
|
[![NuGet Status](https://img.shields.io/nuget/v/Verify.EntityFrameworkClassic.svg)](https://www.nuget.org/packages/Verify.EntityFrameworkClassic/)
|
||||||
|
|
||||||
Extends [Verify](https://github.com/SimonCropp/Verify) to allow verification of EntityFramework bits.
|
Extends [Verify](https://github.com/SimonCropp/Verify) to allow verification of EntityFramework bits.
|
||||||
|
|
||||||
|
@ -12,7 +13,8 @@ toc
|
||||||
|
|
||||||
## NuGet package
|
## NuGet package
|
||||||
|
|
||||||
https://nuget.org/packages/Verify.EntityFramework/
|
* https://nuget.org/packages/Verify.EntityFramework/
|
||||||
|
* https://nuget.org/packages/Verify.EntityFrameworkClassic/
|
||||||
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<Project>
|
<Project>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<NoWarn>CS1591;CS0649;CS8632</NoWarn>
|
<NoWarn>CS1591;CS0649;CS8632</NoWarn>
|
||||||
<Version>0.2.0</Version>
|
<Version>0.2.1</Version>
|
||||||
<PackageTags>EntityFramework, Verify</PackageTags>
|
<PackageTags>EntityFramework, Verify</PackageTags>
|
||||||
<Description>Extends Verify (https://github.com/SimonCropp/Verify) to allow verification of EntityFramework bits.</Description>
|
<Description>Extends Verify (https://github.com/SimonCropp/Verify) to allow verification of EntityFramework bits.</Description>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
|
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
|
||||||
<PackageReference Include="XunitContext" Version="1.8.0" />
|
<PackageReference Include="XunitContext" Version="1.8.0" />
|
||||||
<PackageReference Include="Verify.Xunit" Version="1.19.2" />
|
<PackageReference Include="Verify.Xunit" Version="1.19.2" />
|
||||||
<PackageReference Include="EfLocalDb" Version="6.2.0" />
|
<PackageReference Include="EfLocalDb" Version="6.2.2" />
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
|
||||||
<PackageReference Include="ProjectDefaults" Version="1.0.41" PrivateAssets="All" />
|
<PackageReference Include="ProjectDefaults" Version="1.0.41" PrivateAssets="All" />
|
||||||
<ProjectReference Include="..\Verify.EntityFramework\Verify.EntityFramework.csproj" />
|
<ProjectReference Include="..\Verify.EntityFramework\Verify.EntityFramework.csproj" />
|
||||||
|
|
|
@ -19,16 +19,7 @@ public static class DbContextBuilder
|
||||||
|
|
||||||
static async Task CreateDb(SampleDbContext context)
|
static async Task CreateDb(SampleDbContext context)
|
||||||
{
|
{
|
||||||
//TODO: use helper from localdb
|
await context.CreateOnExistingDb();
|
||||||
var script = ((IObjectContextAdapter)context).ObjectContext.CreateDatabaseScript();
|
|
||||||
try
|
|
||||||
{
|
|
||||||
await context.Database.ExecuteSqlCommandAsync(script);
|
|
||||||
}
|
|
||||||
catch (DbException)
|
|
||||||
{
|
|
||||||
//swallow for already exists
|
|
||||||
}
|
|
||||||
|
|
||||||
var company1 = new Company
|
var company1 = new Company
|
||||||
{
|
{
|
||||||
|
|
|
@ -9,8 +9,8 @@
|
||||||
<PackageReference Include="Xunit" Version="2.4.1" />
|
<PackageReference Include="Xunit" Version="2.4.1" />
|
||||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
|
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
|
||||||
<PackageReference Include="XunitContext" Version="1.8.0" />
|
<PackageReference Include="XunitContext" Version="1.8.0" />
|
||||||
<PackageReference Include="Verify.Xunit" Version="1.19.0" />
|
<PackageReference Include="Verify.Xunit" Version="1.19.2" />
|
||||||
<PackageReference Include="EfClassicLocalDb" Version="6.2.1" />
|
<PackageReference Include="EfClassicLocalDb" Version="6.2.2" />
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
|
||||||
<PackageReference Include="ProjectDefaults" Version="1.0.41" PrivateAssets="All" />
|
<PackageReference Include="ProjectDefaults" Version="1.0.41" PrivateAssets="All" />
|
||||||
<ProjectReference Include="..\Verify.EntityFrameworkClassic\Verify.EntityFrameworkClassic.csproj" />
|
<ProjectReference Include="..\Verify.EntityFrameworkClassic\Verify.EntityFrameworkClassic.csproj" />
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="EntityFramework" Version="6.4.0" />
|
<PackageReference Include="EntityFramework" Version="6.4.0" />
|
||||||
<PackageReference Include="Verify" Version="1.14.1" />
|
<PackageReference Include="Verify" Version="1.19.2" />
|
||||||
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
|
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
|
||||||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
|
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
|
||||||
<PackageReference Include="ProjectDefaults" Version="1.0.41" PrivateAssets="All" />
|
<PackageReference Include="ProjectDefaults" Version="1.0.41" PrivateAssets="All" />
|
||||||
|
|
Загрузка…
Ссылка в новой задаче