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)
|
||||
[![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.
|
||||
|
||||
|
@ -25,7 +26,8 @@ Support is available via a [Tidelift Subscription](https://tidelift.com/subscrip
|
|||
|
||||
## NuGet package
|
||||
|
||||
https://nuget.org/packages/Verify.EntityFramework/
|
||||
* https://nuget.org/packages/Verify.EntityFramework/
|
||||
* https://nuget.org/packages/Verify.EntityFrameworkClassic/
|
||||
|
||||
|
||||
## 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)
|
||||
[![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.
|
||||
|
||||
|
@ -12,7 +13,8 @@ toc
|
|||
|
||||
## NuGet package
|
||||
|
||||
https://nuget.org/packages/Verify.EntityFramework/
|
||||
* https://nuget.org/packages/Verify.EntityFramework/
|
||||
* https://nuget.org/packages/Verify.EntityFrameworkClassic/
|
||||
|
||||
|
||||
## Usage
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<Project>
|
||||
<PropertyGroup>
|
||||
<NoWarn>CS1591;CS0649;CS8632</NoWarn>
|
||||
<Version>0.2.0</Version>
|
||||
<Version>0.2.1</Version>
|
||||
<PackageTags>EntityFramework, Verify</PackageTags>
|
||||
<Description>Extends Verify (https://github.com/SimonCropp/Verify) to allow verification of EntityFramework bits.</Description>
|
||||
</PropertyGroup>
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
|
||||
<PackageReference Include="XunitContext" Version="1.8.0" />
|
||||
<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="ProjectDefaults" Version="1.0.41" PrivateAssets="All" />
|
||||
<ProjectReference Include="..\Verify.EntityFramework\Verify.EntityFramework.csproj" />
|
||||
|
|
|
@ -19,16 +19,7 @@ public static class DbContextBuilder
|
|||
|
||||
static async Task CreateDb(SampleDbContext context)
|
||||
{
|
||||
//TODO: use helper from localdb
|
||||
var script = ((IObjectContextAdapter)context).ObjectContext.CreateDatabaseScript();
|
||||
try
|
||||
{
|
||||
await context.Database.ExecuteSqlCommandAsync(script);
|
||||
}
|
||||
catch (DbException)
|
||||
{
|
||||
//swallow for already exists
|
||||
}
|
||||
await context.CreateOnExistingDb();
|
||||
|
||||
var company1 = new Company
|
||||
{
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
<PackageReference Include="Xunit" Version="2.4.1" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
|
||||
<PackageReference Include="XunitContext" Version="1.8.0" />
|
||||
<PackageReference Include="Verify.Xunit" Version="1.19.0" />
|
||||
<PackageReference Include="EfClassicLocalDb" Version="6.2.1" />
|
||||
<PackageReference Include="Verify.Xunit" Version="1.19.2" />
|
||||
<PackageReference Include="EfClassicLocalDb" Version="6.2.2" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
|
||||
<PackageReference Include="ProjectDefaults" Version="1.0.41" PrivateAssets="All" />
|
||||
<ProjectReference Include="..\Verify.EntityFrameworkClassic\Verify.EntityFrameworkClassic.csproj" />
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<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.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
|
||||
<PackageReference Include="ProjectDefaults" Version="1.0.41" PrivateAssets="All" />
|
||||
|
|
Загрузка…
Ссылка в новой задаче