Answers for "c# authorize attribute"

C#
0

c# authorize attribute

public void ConfigureServices(IServiceCollection services)
{
    services.AddDbContext<ApplicationDbContext>(options =>
        options.UseSqlServer(
            Configuration.GetConnectionString("DefaultConnection")));
    services.AddDefaultIdentity<IdentityUser>()
        .AddRoles<IdentityRole>()
        .AddEntityFrameworkStores<ApplicationDbContext>();

    services.AddControllersWithViews();
    services.AddRazorPages();
}
Posted by: Guest on March-27-2020
0

c# authorize attribute roles

[Authorize(Roles = "HRManager,Finance")]
public class SalaryController : Controller
{
}
Posted by: Guest on April-28-2021

Code answers related to "c# authorize attribute"

C# Answers by Framework

Browse Popular Code Answers by Language