15 Replies
an example of one of my service
also repo
First: Please name your thread better.
AggregateException
literally just means "one or more exceptions"
second: You are registering your repos as their interface, but injecting the concrete repository
inject the interface insteadthank you for your help I fixed it
@Pobiega can you tell me why I cant inject ItemRepos in to ItemService? I have method in itemrepos but don't have in irepo interface and I want to use that method in service
Then you are breaking the entire purpose of having an interface there in the first place
and also your rest of your program is now tightly coupled to your MongoDB implementation of the repository
is that really what you want? in that case, just register the repository without the interface
no that's not I want. I'll keep have generic interface to minimalize my program to mongo
okay, then add your method to the interface
oki doki
if I share my codes in code-review can you review it in general and share your thought and encounters? In that way I can understand my mistakes better and also I can learn that what should I improve.
sure.
can you also tell me what's the problem I show the directory of program as existing repo but I can't commit my changes
should I create a new one
Have absolutely no idea what that is
Doesn't look like VS. Is it vs code?
But the error is pretty clear, it can't access that file due to permissions
I'd shut down the ide entirely and delete the .vs folder
yes. I think I should exclude vs files someone fixed this problem with this solution but couldn't find it on visual studio
Oh yeah you should not be pushing .Vs folder to git
Get a gitignore file
dotnet new gitignore
is goodfixed thank you