xriba
Not sure what Senior Dev expect me to do
That's a good idea. It's better to clarify these things before you start your implementation.
As an example you could create a generic object (SearchCriteria) that contains fields such as pagination and sorting but it really depends on the requirements and expectations. Remember YAGNI
17 replies
Not sure what Senior Dev expect me to do
Have you looked into this? https://learn.microsoft.com/en-us/dotnet/csharp/fundamentals/types/generics
17 replies
✅ Hosted Service running as Windows Service
Documenting for further reference:
1. Windows Services do not exit/shutdown gracefully and therefore
StopAsync
is never called. Here is the open issue: https://github.com/dotnet/runtime/issues/83093
2. The reason why StartAsync
runs into a Socket exception during system/platform startup is because the method is executed before the network is available. Here's my workaround:
19 replies
✅ Hosted Service running as Windows Service
Update on
StartAsync
while not the most elegant, if I delay the execution, the service works which leads me to believe it's related to the DNS not being resolved at first but I'm not sure how to properly ensure it's running
Not Working
Working
19 replies
✅ Hosted Service running as Windows Service
I believe it's related to this open issue https://github.com/dotnet/runtime/issues/83093
19 replies
✅ Hosted Service running as Windows Service
No, I'm using AddWindowsService() as described here. https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/windows-service?view=aspnetcore-8.0&tabs=visual-studio#app-configuration
19 replies
✅ Hosted Service running as Windows Service
It does work, I'm using this endpoint as a sample but even this sample works fine when I start/stop the service manually. https://websocket.org/tools/websocket-echo-server/
19 replies
✅ Hosted Service running as Windows Service
I'm thinking
StartAsync
is executing too early while the system is booting up. Maybe I could delay it by polling Dns until it starts resolving or registering an application started event where I connect the websocket client, but it doesn't feel right to me.
Basically, I want to connect the websocket client while the underlying platform is starting the service.
Also, I want to execute some code and dispose the client when the platform restarts or shuts down.19 replies
❔ EF Core Fluent API - Unidirectional one to many relationship
Yes, it could very well be a value object.
I'm just wondering how to, if possible, implement this relationship.
In the example above, I'd like to generate the relationship in
Square
and not in Coordinate
as Coordinate
does not need to know anything about the shape. However if you look at the second image, you can see that there's a foreign key on Coordinate
.6 replies