zzz projects Entity Framework Core EF Core
Home Articles Knowledge Base Online Examples
  • Home
  • Articles
  • Knowledge Base
  • Online Examples

Entity Framework Core - Knowledge Base (KB)

9 results in tag: multithreading

Thread safe Entity Framework 6

Just starting testing EF6 and its Async functions. Boy was I surprised when I realized that they are not thread safe. I kinda assumed that that was the point....I had my own ...Task... based extension methods for years already, but what I was waiting for ...
entity-framework entity-framework-6 multithreading task-parallel-library
asked by Rabbi

entity framework 6 - check if record exists before insert and concurrency

I have the following scenario:...A business logic function that uses ef6 checks if a record already exists. If the record does not exists, it is inserted on the database....Something like this...if (!product.Skus.Any(s => s.SkuCodeGroup == productInfo.Sku...
.net entity-framework entity-framework-6 multithreading
asked by Thiago Sayão

How to set threading mode in SQLite with Entity Framework?

I'm using SQLite with Entity Framework Core (RC1). ...I read, that ...SQLite supports three different threading modes: Single-thread, Multi-thread and Serialized.......How do I set in run-time, which mode I want to use with my database?
entity-framework-core multithreading sqlite
asked by Tschareck

Lock database row on Read with Entity Framework Core

How is it possible to lock a row on read with EF Core? I found an easy solution using ...TransactionScope...'s but they don't seem to work (class not found)...The problem is when deleting an item, which I do in a thread, and press the delete button twice,...
c# entity-framework-core multithreading
asked by dnanon

Concurrent threads in DB transaction cause major delay in .NET Core EF Core

Background...I am trying to write an ...async... server that works with SQLite DB. I am using .NET Core with ...Entity Framework Core.......I am using UnitOfWork with GenericRepository patterns, but as my sample code below shows, this is not really relate...
.net-core c# database entity-framework-core multithreading
asked by Wapac

Entity Framework Core - Not thread safe - ServiceLifetime.Transient

It appears that my database context is not thread safe, transient, even tho i specified:...ServiceLifetime.Transient ...in the startup configuration for the database....Startup.cs...services.AddEntityFrameworkSqlServer().AddDbContext<DatabaseContext>((se...
.net c# entity-framework entity-framework-core multithreading
asked by Reft

DBContext System.ObjectDisposed Exception with .NET Entity Framework Core, Dependency Injection and threading

I am not sure if I am going about this correctly at all....Background: I have a controller action GET foo() as an example. This foo() needs to go and call bar(), and bar() may take a verrrrrry long time. So, ...I need foo() to respond with "OK" before (or...
c# dependency-injection entity-framework entity-framework-core multithreading
asked by PKCS12

Is a DbContext per thread in Parallel.ForEach safe?

I am working a contract right now to increase the performance of a back end services for a modern SaaS SPA web app that is using EF 6 as their ORM. The first thing I proposed was to introduce some multi-threading to their back end service which is curren...
c# entity-framework entity-framework-6 multithreading parallel-processing
asked by Casey Chester

Entity Framework Core: different threads using the same instance of DbContext

The application was developed on ASP NET Core 3. To log user actions, I decided to use a single method in the Project class. Faced the problem of using one singleton dbContext from different threads....Startup.cs...public void ConfigureServices(IServiceCo...
asp.net-core entity-framework entity-framework-core multithreading
asked by al.koval

Page 1 of 1
  • 1

Prime Library

Performance

  • Entity Framework Extensions
  • Entity Framework Classic
  • Bulk Operations
  • Dapper Plus

Expression Evaluator

  • C# Eval Expression
  • SQL Eval Function
More Projects...

Related

  • EF Extensions Online Benchmark
  • WIN an EF Extensions license
  • EF6 BatchSaveChanges for only $79
Get monthly updates by subscribing to our newsletter!
SUBSCRIBE!