- Soumya Pandey
- SnapDevelop
- Wednesday, 21 June 2023 09:04 PM UTC
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!!
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.