示例#1
0
 public AccountController(
     UserManager <ApplicationUsers> userManager,
     SignInManager <ApplicationUsers> signInManager,
     IEmailSender emailSender,
     ILogger <AccountController> logger,
     bd_lesContext context)
 {
     _userManager   = userManager;
     _signInManager = signInManager;
     _emailSender   = emailSender;
     _logger        = logger;
     _context       = context;
 }
示例#2
0
        public static async Task Initialize(IServiceProvider serviceProvider, string testUserPw)
        {
            using (var context = new bd_lesContext(
                       serviceProvider.GetRequiredService <DbContextOptions <bd_lesContext> >()))
            {
                // The password is set with the following command:
                // dotnet user-secrets set SeedUserPW <pw>
                // The admin user can do anything
                var profileID = await EnsureProfile("admin", 0, context);
                await EnsureProfile("default", 1, context);

                var adminID = await EnsureUser(serviceProvider, testUserPw, "admin", profileID, context);
                await EnsureRole(serviceProvider, adminID, Constants.AdministratorsRole, profileID, context);

                //var uid = await EnsureUser(serviceProvider, testUserPw, "manager", context);
                //await EnsureRole(serviceProvider, uid, Constants.ManagersRole);

                await SeedDBAsync(serviceProvider, context, adminID);
            }
        }
示例#3
0
 public FuncionariosController(bd_lesContext context)
 {
     _context = context;
 }
 public RegManutencaosController(bd_lesContext context)
 {
     _context = context;
 }
示例#5
0
 public ConfigurationsViewController(bd_lesContext context)
 {
     _context = context;
 }
示例#6
0
 public RegRemocoesController(bd_lesContext context)
 {
     _context = context;
 }
 public RegTratamentoesController(bd_lesContext context)
 {
     _context = context;
 }
示例#8
0
 public RegAlimentarsController(bd_lesContext context)
 {
     _context = context;
 }
 public ProjetoesController(bd_lesContext context)
 {
     _context = context;
 }
示例#10
0
 public PlanoAlimentaresController(bd_lesContext context)
 {
     _context = context;
 }
示例#11
0
 public FinalidadesController(bd_lesContext context)
 {
     _context = context;
 }
 public RegAmostragensController(bd_lesContext context)
 {
     _context = context;
 }
示例#13
0
 public DistritosController(bd_lesContext context)
 {
     _context = context;
 }
示例#14
0
 public TanquesController(bd_lesContext context)
 {
     _context = context;
 }
示例#15
0
 public LocalcapturasController(bd_lesContext context)
 {
     _context = context;
 }
示例#16
0
 public AgenteTratsController(bd_lesContext context)
 {
     _context = context;
 }
示例#17
0
 public ConcelhosController(bd_lesContext context)
 {
     _context = context;
 }
示例#18
0
 public PerfisController(bd_lesContext context, RoleManager <IdentityRole> roleManager, UserManager <ApplicationUsers> userManager)
 {
     _context     = context;
     _userManager = userManager;
     _roleManager = roleManager;
 }
示例#19
0
 public RegCondAmbsController(bd_lesContext context)
 {
     _context = context;
 }
示例#20
0
 public TOrigemsController(bd_lesContext context)
 {
     _context = context;
 }
示例#21
0
 public RegNovosAnimaisController(bd_lesContext context)
 {
     _context = context;
 }
示例#22
0
 public GruposController(bd_lesContext context)
 {
     _context = context;
 }
示例#23
0
 public EnsaiosController(bd_lesContext context)
 {
     _context = context;
 }
示例#24
0
 public UniqueAttribute(string value, bd_lesContext context) : base(DefaultErrorMessage)
 {
     _context = context;
 }
示例#25
0
 public MotivoesController(bd_lesContext context)
 {
     _context = context;
 }
 public TipoManuntecaosController(bd_lesContext context)
 {
     _context = context;
 }
示例#27
0
 public FornecedorcolectorsController(bd_lesContext context)
 {
     _context = context;
 }
示例#28
0
 public TipoestatutogeneticoesController(bd_lesContext context)
 {
     _context = context;
 }
示例#29
0
 public FamiliasController(bd_lesContext context)
 {
     _context = context;
 }
示例#30
0
 public ElementoequipasController(bd_lesContext context)
 {
     _context = context;
 }