Thank you all for watching and for your support. ►► If you want to check out all our courses you can do that here: courses.code-maze.com/courses/
@10Totti6 ай бұрын
Another best Tutorial! Thanks!
@CodeMaze6 ай бұрын
You're welcome! Thank for watching this one.
@Tamer_Ali6 ай бұрын
Thanks a lot for the video I hope you take about Permissions and Access Control
@CodeMaze6 ай бұрын
Thanks for the suggestion and watching the video.
@ugochukwuumerie63786 ай бұрын
I second that too 👌🏼
@Nims9915 күн бұрын
Thanks!!! ❤
@CodeMaze14 күн бұрын
You are very welcome. Thank you too for watching the video.
@Nims9913 күн бұрын
@@CodeMaze ❤
@РоманКозакевич-х3э4 ай бұрын
Найкращий!! Дякую вам і Слава Україні !
@CodeMaze4 ай бұрын
I am glad you find the video helpful.
@anilanandachakrabortty14166 ай бұрын
Also, can you please make a video on dynamic roles for role based authorization and how to mapped that dynamic role value in the controller method?
@CodeMaze6 ай бұрын
Interesting suggestion. I will see what I can do about that. Thanks for that.
@shahryarsaljoughi60734 ай бұрын
Thank you, perfect as always. It would be good if you could elaborate more on Role required properties as you initialized them. The original source code of RoleManager does a bit of complex logic for validation before setting those properties. I'm afraid I may break something if i use the constructor in despite of the common usage of RoleManager for creating roles. Is it possible to inject and use the RoleManager within the entity configuration?
@CodeMaze4 ай бұрын
Hi. Thanks for the kind words. To be honest, I never dived deep into the implementation - I love the abstraction as is :) It is a service, and can be injected as a service inside any class. Now, I didn't need it inside the entity configuration class, so you have to try that.
@philipquarles46795 ай бұрын
I am using VS 2022. I opened the PMC and entered: "Add-migration IdentityRoles" . The PMC displayed the following error: The INSERT statement conflicted with the FOREIGN KEY constraint "FK_AspNetUserRoles_AspNetUsers_UserId". The conflict occurred in database "IdentityYT", table "dbo.AspNetUsers", column 'Id'. The statement has been terminated. I inspected the ASP tables created by the migration. The AspRoles table has two roles (Visitor and Admin). None of the other ASP tables have any data. What am I missing? Thank you for your help
@CodeMaze5 ай бұрын
I am not sure, but based on the error message it means that you have users with different Ids, maybe in migratin files, and EF Core can't refernce those tables using FKs. Probably the UserRolePopulated migration file is trying to insert different user ids. Maybe, as you said, you don't have any users created, so you need to create one and use the id inside the UserROlePOpulated migration script. This is my solution based on the migration scripts I provided with the source code.