✅ Help me please
I am trying to do a project using asp.net identity. I am following n-layer mvc architecture, keeping the dal, bll and presentation layers separate connecting them with Startup classes. However the migration is not working. The project doesn't run either. Would anyone be willing to help? I can share my github.
14 Replies
$details
When you ask a question, make sure you include as much detail as possible. Such as code, the issue you are facing, and what you expect the result to be. Upload code here https://paste.mod.gg/ (see $code for more information on how to paste your code)
"the migration is not working" doesn't tell me anything. Is this EF Core? Is it creating or running the migration that doesn't work? What error messages?
EF Core
You seem to be trying to inject a user into transactionservice
That seems like a very weird setup
Show me the constructor for TransactionService
Yeah you are injecting a user
Can't do that. Inject a http context accessor instead
Or something that you can fetch the user from
I usually make my own
UserContext
object for this purposeHow do i do that? I already have a user entity
Google http context Accessor
You don't inject the user, you get it from the context
So the transaction entity will not need a user attribute to see who created it?
I'm not saying that
I'm saying you can't inject a user
oh i see
My bad
I get it now
Thanks
$close
Use the
/close
command to mark a forum thread as answered