Is there any way to auto include Microsoft.AspNetCore.Authorization, when scaffolding the Service/Controller from the Model.
For Example :
Whenever I scaffold Controller/Service from Model, I get a controller with following Namespace...
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Http;
using System;
using System.Linq;
..........................
And each time, in order to enable authentication, I will have to include Microsoft.AspNetCore.Authorization explicitly!!!!
Instead of that, can we include Microsoft.AspNetCore.Authorization Namespace automatically at the time of scaffolding? like
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Authorization;
using System;
using System.Linq;
......................................
Thanks!!
Taking your suggestion, I will certainly add an enhancement request ticket for this "Requires Authorization" Feature. Thanks.