ZeroLib.EntityFramework
1.0.2
dotnet add package ZeroLib.EntityFramework --version 1.0.2
NuGet\Install-Package ZeroLib.EntityFramework -Version 1.0.2
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ZeroLib.EntityFramework" Version="1.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ZeroLib.EntityFramework --version 1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: ZeroLib.EntityFramework, 1.0.2"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install ZeroLib.EntityFramework as a Cake Addin
#addin nuget:?package=ZeroLib.EntityFramework&version=1.0.2
// Install ZeroLib.EntityFramework as a Cake Tool
#tool nuget:?package=ZeroLib.EntityFramework&version=1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Example
insert
Use object IList<T> to extension
delete
Use IQueryable<T> to extension
private bool submit(MyDataDbContext db)
{
try
{
if (db.Database.Connection.State != ConnectionState.Open)
{
db.Database.Connection.Open();
}
var idlist = NewItems.Person.Select(x => x.Id).ToList();
var count = 0;
count = db.Person.Where(x => idlist.Contains(x.Id)).BatchDelete();
idlist = NewItems.PersonItem.Select(x => x.Id).ToList();
count = db.PersonItem.Where(x => idlist.Contains(x.Id)).BatchDelete();
DelItems.Person.BulkInsert((SqlConnection)db.Database.Connection, "Person");
DelItems.PersonItem.BulkInsert((SqlConnection)db.Database.Connection, "PersonItem");
if (db.Database.Connection.State != ConnectionState.Closed)
{
db.Database.Connection.Close();
}
return true;
}
catch (Exception ex)
{
Log($"Fail:{ex.Message}" );
return false;
}
}
And there is no more detail... ^_^
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net is compatible. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
- EntityFramework (>= 6.2.0)
- Z.EntityFramework.Plus.BatchDelete.EF6 (>= 1.7.10)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.