Thank you all for watching and for your support. ►► If you want to master Web API development using best practices, check out our Web API book: bit.ly/3x75ZMM ►► Also, to build great full-stack apps with Blazor, check out our course: bit.ly/3Pw3Y33
@РоманКозакевич-х3э3 ай бұрын
Найкращий!! Дякую вам і Слава Україні !
@CodeMaze3 ай бұрын
I am glad you find the video helpful.
@10Totti5 ай бұрын
Another best Tutorial! Thanks!
@CodeMaze5 ай бұрын
You're welcome! Thank for watching this one.
@Tamer_Ali5 ай бұрын
Thanks a lot for the video I hope you take about Permissions and Access Control
@CodeMaze5 ай бұрын
Thanks for the suggestion and watching the video.
@ugochukwuumerie63785 ай бұрын
I second that too 👌🏼
@shahryarsaljoughi60733 ай бұрын
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?
@CodeMaze3 ай бұрын
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.
@anilanandachakrabortty14165 ай бұрын
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?
@CodeMaze5 ай бұрын
Interesting suggestion. I will see what I can do about that. Thanks for that.
@philipquarles46794 ай бұрын
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
@CodeMaze4 ай бұрын
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.