Edit role in asp net core

preview_player
Показать описание

Text version of the video

Healthy diet is very important for both body and mind. We want to inspire you to cook and eat healthy. If you like Aarvi Kitchen recipes, please support by sharing, subscribing and liking.

Slides

ASP.NET Core Text Articles & Slides

ASP.NET Core Tutorial

Angular, JavaScript, jQuery, Dot Net & SQL Playlists
Рекомендации по теме
Комментарии
Автор

Error open DataReader Solution:


For anyone experiencing an error with their DataReader solution already being open the problem is that "userManager.Users" is not asynchronous. One solution to this is to extend it with the following: be sure to #include in order to access this extension method.


CODE FROM VIDEO WITH ERROR
//foreach (var user in userManager.Users)
//{
// if (await userManager.IsInRoleAsync(user, role.Name))
// {
//
// }
//}


NEW CODE WITH EXTENSION
//foreach (var user in await
//{
// if (await userManager.IsInRoleAsync(user, role.Name))
// {
//
// }
//}


A proposed solution for some is to add to their connection string however, if you're using MySQL Server instead of SQLServer this will not be available.

Dugz
Автор

You have reached beyond the pinnacle of tutorial arts. I, my dear friend, remain in awe.

arwahsapi
Автор

Dugz: Good job!

Saved me a lot of time.

As I am using .NET CORE 3.1, I now tend to read all the comments to identify potential problems BEFORE implementing the code he used for .NET CORE 2.2

michaelt
Автор

14:11
you don't have to instantiate the list in the constructor in latest version of c#. You can easily do that in the property itself.
public List<string> Users { get; set; } = new List<string>();

_samirdahal
Автор

you are brilliant Venkat you have explained two concepts in one shot. Complete CRUD along with Identity. wonderful. wonderful. wonderful tutorial. thanks from the bottom of my hear

standman
Автор

8:37 Why not just use
var users = await
instead of retrieving all users and check them one by one if they are in the role?

Or was GetUsersInRoleAsync not available when the video was created?

conaxlearn
Автор

It's been a week, we haven't seen any new video uploaded. WE MISSED YOU VENKAT.

mohannepal
Автор

foreach(var user in userManager.User) throws exception like DataReader connection already opened so kindly use foreach(var user in userManager.User.ToList()). Thank for great tutorial Venkat

muhammadkamranmalik
Автор

Thank u sir, I'm following this series and learning asp.net core everyday.

shuvo
Автор

Admin role can't delete. Only admin can add or remove other roles. How admin set specific prevelig to other roles in asp.net core ? In this project admin can perform crud operation while other users can't. How to implement this?

mhraamirali
Автор

there is an arror at <div class="form-group row">
<label asp-for="RoleId" class="col-sm-2 col-form-label"></label>
<div class="col-sm-10">
<input asp-for="RoleId" readonly class="form-control">
</div>
</div>
When you add the disabled attribute to an HTML input element, it will prevent the input from being edited by the user. However, it will also exclude the input from being submitted with the form data when the form is posted. If you want to display the RoleId without allowing the user to edit it, you can use a readonly input instead of a disabled input.

IllSkillz
Автор

thank you, it's not just a tutorial. it's complete learning of .net core. and is it possible to cover signalr?

mohammadrezamrg
Автор

Please make tutorials on Docker and microservices in Asp.net Core.

dullidddd
Автор

Thankyou for this awsome tutorial very helpful as always !

SM-omtw
Автор

Stupendous tutorial, you make it look so easy with a subject I had difficulties with. Many Thanks and keep them coming.

rayt
Автор

The best asp.net core tutorial out there! You're also the best educator imo. I guess next step is combing all these cool steps into complete asp.net project do it please :D

golodiassaid
Автор

Such a great video. I have been being a great fan of you. Sir

ashwinikumar
Автор

when you will finish asp.net core tutorials?

mahdiabbaszadeh
Автор

Great video really appreciate the help! Currently implementing your tutorials in my major project. Thank you :)

KarMadz
Автор

for some reason the tag helpers are not working for editrole! whenever i click on the edit button it doesnt throw an exception and the id is also not attached to the Url! can anyone help me with this?

muhammadwaqasiqbal