Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
N

nwbkn

@nwbkn
About
Posts
2
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Project structure with C# and EfCore
    N nwbkn

    Thanks for the response!

    C# csharp tutorial asp-net visual-studio sysadmin

  • Project structure with C# and EfCore
    N nwbkn

    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). 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!

    C# csharp tutorial asp-net visual-studio sysadmin
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups