C
C#

Project structure (MVC API, microservice arch.)

Project structure (MVC API, microservice arch.)

Tthomas11/18/2023
https://github.com/classy-giraffe/Bookshop I'd like to know if the folder structure looks good here and if it make sense the i split each controller/service
JJimmacle11/18/2023
that repo doesn't exist
Tthomas11/18/2023
hold on yea it's private šŸ˜­ @Jimmacle try now
AAngius11/18/2023
I'd certainly utilize the global exception handler instead of writing the try..catch...return 500 manually in each action Nice services, I like that you're not falling for the generic repo trap here Although I'd definitely utilize asynchronous code Far as the structure itself goes, it seems pefectly fine
Tthomas11/18/2023
Is this a C# specific idiom?
AAngius11/18/2023
ASP-specific one, I'd say Exception handling middleware already exists, it already returns an error 500 whenever an exception occurs Why not use it?
Tthomas11/18/2023
(i'm kinda learning c# on the spot mixing Rust experience and some little java i learnt at uni, so yh i might not know about specific patterns)
AAngius11/18/2023
For learning on the spot, it looks really good
Tthomas11/18/2023
Yeah im literally picking up C# as im writing this project (should be a microservice based app). I have to be fair, the syntax is quite similar to Java and C++ so its not very complicated.
AAngius11/18/2023
Well it's definitely not microservice-based lol
Tthomas11/18/2023
I had some issues with entity framework while configuring the relationships at the beginning. Having a service folder with multiple services in it doesn't qualify as microservice? šŸ˜­
AAngius11/18/2023
'Fraid not Microservice architecture is based on, well, micro services You have a separate app, basically, that just deals with users And another separate one that just deals with books They can connect to the same database, but run completely separately So that you can, for example, hot-swap a given microservice without affecting others /books might have downtime as you're updating it to version 1.1, but user registration and login still works because it still runs on /user Orelans is the .NET microserfvice framework
Tthomas11/18/2023
This def came across while googling but i'm afraid i can't use this as its a uni project (i have to follow certain specs) ASP.Net Core + EF + Docker + K8s pretty much that So multiple executables?
AAngius11/18/2023
Yep All synchronized with some message queue, for example If need be
Tthomas11/18/2023
is it too late to do this? How would i structure a project like that folder wise?
AAngius11/18/2023
ĀÆ\_(惄)_/ĀÆ I never worked with microservices Never intend to, really
Tthomas11/18/2023
Me too, tbh i think the whole MicroService thing is a hypetrain that will derail anytime soon
Tthomas11/18/2023
I'll have to trash this as well i guess as each micro service would have its own db
No description
AAngius11/18/2023
Why? I mean, I guess each microservice can have its own db But does it have to? Idk tbh Change the title of this post to ask for help with microservices, maybe you'll attract people more in the know with it lol

Looking for more? Join the community!

C
C#

Project structure (MVC API, microservice arch.)

Join Server
Want results from more Discord servers?
Add your server
Recommended Posts
How can I insert my sortedlist into a listbox?I am new to C# and currently using a sortedlist<string, int> in order to store values that I need toHow to map Entity Framework entities containing circular references to DTOs?When querying data with Entity Framework, the result data appears to contain circular references. (āœ… Typeorm doesnt get the name from entityI need that typeorm get the ```name: "noInfoMILeadsToDistribute"``` inside Entity, but it wants to gProcessing files as fast as possibleHi everyone! I have a question that Iā€™m sure you can help me with. Iā€™m making a library that needs tāœ… [SOLVED] Does the 3rd line of code hold memory as a reference or does it hold the actual value?ayooo, quick question. pretty simple. Book is a custom class just so you know.... ```csharp Book boRequestsHello, i have never done something that i will say before, how can i send a request to an API Url, gWhy is my grid on Line 28 not calling back to my other script called Grid?āœ… Visual Studio 2022 Failing to Create C# ProjectWhat's happening here?āœ… Help with creating shapes on a windows form appI have created a windows form app to display shapes on a bitmap, my circle function works fine but mNo inbuilt functionsHello, im a year 1 student so my knowledge is not that massive. So i have this task for university wSignalR initial connection takes way too long (logs included in comments)Hey there. So I have two versions of the same application, using essentially the same code. One of āœ… How to make DontDestroyOnLoad work for only single scene?Hello! I have a problem. In my game, when I am on my Main Menu Scene and trying to load Main Game ScUI is lagging while scrolling a listViewHi, I wanted to create an application that retrieves data from the API and displays it. I'm having tHow can i fix this error code?he's giving me an error code for private?Visual Studio 2022 ExtensionI'm working on a visual studio 2022 Extension. But as soon as i import it inside the visual studio 2āœ… ValidationContext in ASP.NETWhat does ObjectInstance and ObjectType mean? afaik 1) ValidationContext is basically on which claUpdated from 2021 to 2022 version of unity, getting NavMeshSurface related error.Hey y'all, I'm an absolute newbie trying to make a basic game and figured the unity tutorials would Cache not clearing, what am I missing?Does anyone know why this cache is not clearing? I am trying to implement simple rate limiting an aiCal (webcal://) does not doing a sync in outlook365I have my .net core app, and my app generates a link using iCal.NET nuget, and initially it generateDesign Pattern for mapping generic class type to implementationHey all, I'm working on an executor service that maps an executor record of a generic type to an ex