Dynamically load API Controllers ASP.NET

So i was thinking of a concept that allows me to seperate my controllers from the main application in ASP.NET The way it would work is that i can make some sort of DLL/Library file for specific controllers and put them into a folder along with the main program which then load as controller for example Main App -> APIController.dll : contains /api/ -> ServiceController.dll : contains /service/ and so on TLDR; How to make APIControllers load dynamically as DLL files if possible
41 Replies
WEIRD FLEX
WEIRD FLEX6mo ago
a bunch of people asked for this recently https://learn.microsoft.com/en-us/dotnet/api/system.reflection.assembly.loadfrom?view=net-8.0 it's something i wanted to try too, honestly
MODiX
MODiX6mo ago
Kowalski
<@347434717022257162> Okay i figured it out. Apparently if i wanna use controllers from a different assembly, i need to add them as "ApplicationParts" like this
From Kowalski
React with ❌ to remove this embed.
Unknown User
Unknown User6mo ago
Message Not Public
Sign In & Join Server To View
Waffles from Human Resources
I mostly want to do it for the sake of being able to update more flexibly
Unknown User
Unknown User6mo ago
Message Not Public
Sign In & Join Server To View
MODiX
MODiX6mo ago
dotnet
YouTube
Vertical Slice Architecture: How Does it Compare to Clean Architect...
Is Vertical Slice Architecture the next big thing or just as cool new kid? Enterprise software development requires you to choose the right architecture. This session with Luke Parker will provide a realistic dive into Vertical Slice Architecture (VSA) with .NET; showcasing the potential shift from Clean Architecture (CA) to VSA. You will lear...
Derek Comartin
CodeOpinion
Restructuring to a Vertical Slice Architecture
What is Vertical Slice Architecture? It's about focusing and organizing code by features and capabilities, not technical concerns!
Waffles from Human Resources
Imagine if I want to add a new feature and suddenly need to make an urgent patch
Unknown User
Unknown User6mo ago
Message Not Public
Sign In & Join Server To View
Waffles from Human Resources
Hm Would still be nice for a multi service backend
Unknown User
Unknown User6mo ago
Message Not Public
Sign In & Join Server To View
Waffles from Human Resources
Pretty much
Unknown User
Unknown User6mo ago
Message Not Public
Sign In & Join Server To View
Waffles from Human Resources
I mean reverse proxy and all is fine I did that before I just think if I want to add more stuff I'd rather have it dynamic
Unknown User
Unknown User6mo ago
Message Not Public
Sign In & Join Server To View
Unknown User
Unknown User6mo ago
Message Not Public
Sign In & Join Server To View
Waffles from Human Resources
Talking about git I use a method called feature branching so every new feature gets a branch that gets merged into dev branch and then eventually into release branch If something is merged into dev branch my feature branch won't be updated cause it's not dev and then I need to rebase Since I couldn't test it yet, will rebasing my code to dev branch delete my new feature code?
Unknown User
Unknown User6mo ago
Message Not Public
Sign In & Join Server To View
Waffles from Human Resources
Once. But I just changed 1 line in a readme
Unknown User
Unknown User6mo ago
Message Not Public
Sign In & Join Server To View
Waffles from Human Resources
I mean no
Unknown User
Unknown User6mo ago
Message Not Public
Sign In & Join Server To View
Waffles from Human Resources
But I'm not sure what happens to files that have been updated in the previous merge
Unknown User
Unknown User6mo ago
Message Not Public
Sign In & Join Server To View
Unknown User
Unknown User6mo ago
Message Not Public
Sign In & Join Server To View
Waffles from Human Resources
Thing is that I only ever used git as a solo developer and I only had my dev and release branch so far But I'm slowly starting to develop in smaller teams and figured feature branching might be a good approach
Unknown User
Unknown User6mo ago
Message Not Public
Sign In & Join Server To View
Unknown User
Unknown User6mo ago
Message Not Public
Sign In & Join Server To View
WEIRD FLEX
WEIRD FLEX6mo ago
the only tool that will avoid difficult commit conflicts is organizing the work beforehand
Unknown User
Unknown User6mo ago
Message Not Public
Sign In & Join Server To View
Unknown User
Unknown User6mo ago
Message Not Public
Sign In & Join Server To View
Waffles from Human Resources
A rebase is done typically before beginning the work This way it's always up to date
WEIRD FLEX
WEIRD FLEX6mo ago
if you have setup a webhook that notices you when other people commits it's good if not you just try to fetch before a commit
Waffles from Human Resources
Anyways I'll try to figure out a way for my original message later and also take a look at feature slicing We do I never do anything without those webhooks they are wonderful
Unknown User
Unknown User6mo ago
Message Not Public
Sign In & Join Server To View
Unknown User
Unknown User6mo ago
Message Not Public
Sign In & Join Server To View
Waffles from Human Resources
I mean this
Want results from more Discord servers?
Add your server
More Posts
.csproj cannot be found in newly created solutionI created a new Avalonia Cross Platform MVVM solution in JetBrains Rider with .NET 8 (not able to chUpdate DataGridView in Winforms doesnt workHello, I'm trying since yesterday to Update the DataGridView in my project after a Button was clicke✅ Nested views failingHello! so, I've got a small issue. I have this view called Edit which has the following button: ``.NET SDK problems adding to PATH on MacHello. I've recently gotten a Mac for work and am having troubles setting up my environment properlyFormat a Number to a String in Scientific Notation, Only if It Has Enough DigitsI have a series of numbers that can be either large integers, or very small decimals. I would like nProcess Start without my Program being the "parent"Hi, How can I use System.Diagnostics.Process.Start without my program being the "parent" program, IUnable to get my groundCheckTransform to appear under the player in unity.Within the code, I am attempting to get the ground check transform to appear in the player scriptingSpecific load balancerGood afternoon. I have a task to write a load balancer for an online game where clients establish w✅ [EF Core] Why does my database entity have a one-directional FK Connection?Business entity: `BusinessPromotion BusinessPromotion { get; set; }` BusinessPromotion entity: `publ✅ Declaring a Dictionary as a Member VariableTrying to define a dictionary as a member variable in a class. Getting this error: ``` Array initial