public DetailsModel(ExoneracionProject.Data.RecruitContext context,
                     Microsoft.AspNetCore.Identity.UserManager <IdentityUser> userManager)
 {
     _context         = context;
     this.userManager = userManager;
     NewCandidato     = new Models.Candidato();
     NewJob           = new Models.Job();
 }
Exemple #2
0
        public static void Initialize(RecruitContext context)
        {
            context.Database.EnsureCreated();

            // Look for any students.
            if (context.Admins.Any())
            {
                return;   // DB has been seeded
            }

            var admin = new Admin[]
            {
                new Admin {
                    Id = Guid.NewGuid(), Name = "Alexander Perez", JobTittle = "Manager"
                },
                new Admin {
                    Id = Guid.NewGuid(), Name = "Manuel Miguel", JobTittle = "HR Employee"
                },
            };

            context.Admins.AddRange(admin);
            context.SaveChanges();
        }
 public IndexModel(ExoneracionProject.Data.RecruitContext context)
 {
     _context = context;
 }
 public DeleteModel(ExoneracionProject.Data.RecruitContext context)
 {
     _context = context;
 }
Exemple #5
0
 public CreateModel(ExoneracionProject.Data.RecruitContext context)
 {
     _context = context;
     Job      = new Models.Job();
 }
Exemple #6
0
 public EditModel(ExoneracionProject.Data.RecruitContext context, IHtmlHelper htmlHelper)
 {
     _context        = context;
     this.htmlHelper = htmlHelper;
 }