Skip to main content

Questions tagged [efcore]

The tag has no usage guidance.

0 votes
0 answers
42 views

Designing an optimization on throughput of EF.Core application

I am looking for feedback on a design problem I encountered when processing batches of db entries. The issue at hand is efficiency and throughput of an application. The application looks like this ...
Samuel's user avatar
  • 723
0 votes
0 answers
142 views

How to design entities to keep up with the depth of JSON objects?

To better context see Rich Authorization Requests for OAuth2 As u can read here there are some common data field types like actions, locations etc. So I have created C# entity for EF as below: public ...
Szyszka947's user avatar
0 votes
0 answers
193 views

Avoiding reloading entities many times with EF Core and Mediatr

We have a largeish .NET Core project which uses Mediatr and EF Core. Many of the queries look something like: public class GetSomeInformation : IRequest<string> { public int DocumentId { get;...
Lou's user avatar
  • 265
0 votes
1 answer
264 views

DDD+CQRS - Should I always check if the Databases are online?

I'm developing an intranet application and I'm trying to use some concepts from Domain Driven Design (DDD) and Command and Query Responsibility Segregation (CQRS) in .NET Core, with EFCore. But, to ...
Rick Wolff's user avatar
0 votes
2 answers
636 views

Structure database for timeline with different objects

I need to work on a project where we have a "case". Within this case we need to attach different things, in a timeline. Those things can be: Status change (Open, On hold, Closed) Messages (...
Roy Berris's user avatar
3 votes
1 answer
826 views

CRUD is too simplistic for my usecases, how would you handle the repository pattern when using MediatR and EF Core?

I have a .Net 5 Web API project and use MediatR to encapsulate my business logic into commands and queries since I don't like to have a single CRUD service handling everything related to a specific ...
Olaf Svenson's user avatar
0 votes
1 answer
268 views

Should I decouple domain models from IIdentity in ASP.NET core?

I saw a lot of examples of decoupling domain models from Identity models. For my knowledge, currently IIdentity is included in standard .NET library, so is this actual now and should I follow this ...
FoxPro's user avatar
  • 111
1 vote
1 answer
718 views

DbContext lifetime in desktop app with SQLite

I am creating a small data-driven desktop application using .NET 5 with WPF, ReactiveUI, Dynamic Data, and EF Core 5. The app uses a local SQLite database to store all persisted state, and relies ...
wired_in's user avatar
  • 332
3 votes
5 answers
488 views

How should I work around a particular "chicken and egg" problem with entity construction?

I'm struggling to think of a concise way to phrase the question, but assume you were developing an application that managed employees at various company branches. You could potentially model this part ...
Tagc's user avatar
  • 439
1 vote
2 answers
816 views

Is it acceptable to pass a "context object" through a pipeline of entities?

Overview Domain-driven design prescribes modelling a particular domain with classes that contain both state and behaviour. Microsoft attempt to support this methodology in modern C# applications ...
Tagc's user avatar
  • 439
1 vote
0 answers
359 views

Should I use a Web API between a client and Entity Framework?

I am creating a database that will keep track of my company's clients, and an app that will allow users inside the company to read/update/etc. the database. I'm using code-first EF Core to manage the ...
Craig Brown's user avatar
5 votes
2 answers
614 views

DDD Domain Modeling of Transportation Module

I am in the process of trying to model a transportation module for an ERP type system using C# and EF Core. This service is responsible for managing customer pickups and company-owned truck ...
jwyoung's user avatar
  • 59
4 votes
2 answers
5k views

Are in-memory database a form of integration tests?

I have looked through most of the answers given regarding using in-memory database for unit test, but I could not find one that was clear to me. I am writing some unit tests to cover some of our ...
elfico's user avatar
  • 153
0 votes
2 answers
2k views

Call API endpoint from API itself

I'm creating an .NET Core 3 API with Entity Framework. The data is from an existing database. Now I've the following situation: /persons -- get all the persons /companies -- get all the companies /...
Bjorn's user avatar
  • 67
1 vote
2 answers
780 views

Is there still a place for non-async methods in Data Repository?

If we start a .NET Core 3.0 project today, which will use database connection (for example ASP.NET Core Web API), is there still a place for non-async operations while talking to the database? Or in ...
Adam Wojnar's user avatar

15 30 50 per page