dragzun
✅ LINQ Include does not bring all related entities
I am trying to get a client with all its related entities , however my ClientContact entity from ClientsXclientContacts is null, even though I have values in my db. Just for the reference, Main and Financial Contacts work fine.
Here is how my code looks : https://paste.mod.gg/lanuzclgzlqs/0
2 replies
✅ Pass status as parameter in controller
Hello, I am trying to retrieve a list of Active Employees, for this purpose, I have a separate domain where I keep my logic by having a GetActiveEmployees method. Then in my controller, I am calling the method but I want my endpoint to be : GET api/employees?status=active. My question is how can I pass the status which should always be active. At the moment the issue is that whatever I put in as status, it still works, whereas I want to have it work only if the status is active.
Here is my domain logic :
https://gyazo.com/7eb168cb68a632d14a28b3c1f1ecc3c9
and here is my controller :
https://gyazo.com/8c907a7ddcadd79b6a95f4ef0a1dc185
74 replies
❔ Web application builder order
I have the following issue : I am working on an web application that uses Serilog. I have created a custom Global Exception Handling Middleware which I use to get more details regarding exceptions. Issue is, because of the order I am using for the configure methods from my builder, basically builder.ConfigureLogging is called before builder.ConfigurePipeline , which is the middleware, the exception is not being caught by the middleware, it gets treated by serilog. I cannot change the app order since some of them depend on each other to run. Sadly I cannot share code, I am wondering if anyone could have a suggestion regarding this issue based on what I've described. Thank you.
2 replies