Rezi
Rezi
CC#
Created by Rezi on 2/14/2024 in #help
Second part time job
Hey guys, As an middle level developer. Where can i find second job? Remotely. Like 4h a day.
15 replies
CC#
Created by Rezi on 12/28/2023 in #help
dependency injection problem. hangfire jobs.
so i have this problem. whenever i'm trying to inject dbcontext in my service layer for my hangfire job, i get error that db context is already being disposed. but if i do by using IserviceScopeFactory. it's working. (found this solution in chatgpt). but i don't rly like this. how can i configure hangfire so it doesn't dispose dbcontext prematurely? any ideas? public class JobService : IJobService { private readonly IServiceScopeFactory _serviceScopeFactory; public JobService(IServiceScopeFactory serviceScopeFactory) { _serviceScopeFactory = serviceScopeFactory; } public async void UpdateJobStatus() { using var scope = _serviceScopeFactory.CreateScope(); var jobRepository = scope.ServiceProvider.GetRequiredService<IJobRepository>(); } }
3 replies
CC#
Created by Rezi on 11/25/2023 in #help
quick question. clean architecture
hey guys, quick question here. i want to make a custom error txt. for example: data not found. data is deleted. stuff like that. i than want to throw that from application layer. where would i store this error? in domain layer as like general error or in application layer?
5 replies