Click here to Skip to main content
16,004,564 members
Home / Discussions / C#
   

C#

 
GeneralRe: multi tcp clients Pin
darinka3-Jul-24 6:59
darinka3-Jul-24 6:59 
QuestionHow I write this logic to check if string in a list and also checked ? Pin
Martin Adams 202326-Jun-24 13:07
Martin Adams 202326-Jun-24 13:07 
AnswerRe: How I write this logic to check if string in a list and also checked ? Pin
OriginalGriff26-Jun-24 18:24
mveOriginalGriff26-Jun-24 18:24 
GeneralRe: How I write this logic to check if string in a list and also checked ? Pin
Martin Adams 202327-Jun-24 1:46
Martin Adams 202327-Jun-24 1:46 
AnswerRe: How I write this logic to check if string in a list and also checked ? Pin
Richard Deeming27-Jun-24 2:35
mveRichard Deeming27-Jun-24 2:35 
GeneralRe: How I write this logic to check if string in a list and also checked ? Pin
Martin Adams 202327-Jun-24 2:46
Martin Adams 202327-Jun-24 2:46 
GeneralRe: How I write this logic to check if string in a list and also checked ? Pin
OriginalGriff27-Jun-24 3:55
mveOriginalGriff27-Jun-24 3:55 
QuestionProject structure with C# and EfCore Pin
nwbkn20-Jun-24 4:54
nwbkn20-Jun-24 4:54 
Hi,
I'm currently learning how to use Entity Framework Core and I'm trying to create a "more advanced" application divided into multiple projects.

When I was using ADO.NET, I would usually make:

- Project.DatabaseAccess - for managing connection strings,
- Project.Shared - base classes and interfaces (which implement INotifyPropertyChanged)
- for example Project.Customers - models for customer-related stuff and a static class with CRUD methods for them.

Customers would then reference the Shared and DatabaseAccess projects.

When using EfCore, I wanted to achieve similar structure, so:

- Project.DatabaseAccess - managing connection strings, main DbContext
- Project.Shared,
- Project.Customers - models for customer-related stuff and repositories for them (with DbContext provided in the constructor)

The problem with that approach is that Customers reference to the DatabaseAccess (for accessing DbContext), and DatabaseAccess needs to reference to the Customers (because it has DbSet<customer>). Unfortunately, you can't make A<-->B references in the Visual Studio.

What other project structures do you recommend? I know that there is something called CleanArchitecture (Application, Domain, Infrastructure), but it doesn't provide the separation between different spheres of my program (Project.Customers, Project.Planning, Project.Mailing, etc.)

Thank you in advance!
AnswerRe: Project structure with C# and EfCore Pin
jschell20-Jun-24 12:41
jschell20-Jun-24 12:41 
GeneralRe: Project structure with C# and EfCore Pin
nwbkn21-Jun-24 6:35
nwbkn21-Jun-24 6:35 
GeneralRe: Project structure with C# and EfCore Pin
Richard Andrew x6423-Jun-24 4:58
professionalRichard Andrew x6423-Jun-24 4:58 
GeneralRe: Project structure with C# and EfCore Pin
Waqas Khan 202427-Jun-24 2:22
Waqas Khan 202427-Jun-24 2:22 
QuestionC# Newbie, Database Programming Pin
JasonParker33320-Jun-24 2:03
JasonParker33320-Jun-24 2:03 
AnswerRe: C# Newbie, Database Programming Pin
OriginalGriff20-Jun-24 2:09
mveOriginalGriff20-Jun-24 2:09 
GeneralRe: C# Newbie, Database Programming Pin
JasonParker33320-Jun-24 3:18
JasonParker33320-Jun-24 3:18 
GeneralRe: C# Newbie, Database Programming Pin
OriginalGriff20-Jun-24 4:36
mveOriginalGriff20-Jun-24 4:36 
AnswerRe: C# Newbie, Database Programming Pin
Richard MacCutchan24-Jun-24 6:12
mveRichard MacCutchan24-Jun-24 6:12 
GeneralRe: C# Newbie, Database Programming Pin
JasonParker33324-Jun-24 6:18
JasonParker33324-Jun-24 6:18 
GeneralRe: C# Newbie, Database Programming Pin
trønderen24-Jun-24 7:18
trønderen24-Jun-24 7:18 
GeneralRe: C# Newbie, Database Programming Pin
Richard MacCutchan24-Jun-24 7:50
mveRichard MacCutchan24-Jun-24 7:50 
GeneralRe: C# Newbie, Database Programming Pin
trønderen24-Jun-24 8:08
trønderen24-Jun-24 8:08 
GeneralRe: C# Newbie, Database Programming Pin
Richard MacCutchan24-Jun-24 9:33
mveRichard MacCutchan24-Jun-24 9:33 
AnswerRe: C# Newbie, Database Programming Pin
Member 1527072924-Jun-24 9:01
Member 1527072924-Jun-24 9:01 
QuestionWhere To Find This DLL Pin
Kevin Marois11-Jun-24 17:57
professionalKevin Marois11-Jun-24 17:57 
AnswerRe: Where To Find This DLL Pin
Dave Kreskowiak11-Jun-24 18:29
mveDave Kreskowiak11-Jun-24 18:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.