Пример #1
0
        private void seedUserRolesTable(ObukaPasaContext context)
        {
            context.UserRoles.Add(
                new IdentityUserRole <string>()
            {
                UserId = "1", RoleId = "1"
            }

                );

            context.SaveChanges();
        }
Пример #2
0
        private void seedRolesTable(ObukaPasaContext context)
        {
            context.Roles.AddRange(
                new IdentityRole()
            {
                Id = "1", Name = "Admin"
            },
                new IdentityRole()
            {
                Id = "2", Name = "Korisnik"
            }
                );

            context.SaveChanges();
        }
Пример #3
0
        private void seedObukeTable(ObukaPasaContext context)
        {
            //dodaj obuke

            context.SaveChanges();
        }
Пример #4
0
 public Seeder(ObukaPasaContext _context)
 {
     this.context = _context;
 }