Ejemplo n.º 1
0
        static void Main()
        {
            //DATA.DbSeed.Seed(new Data.TicketingSystemDbContext());

            DrawTitle();

            var context = new DATA.TicketingSystemDbContext();

            context.Database.Migrate();

            while (true)
            {
                Print();
            }
        }
Ejemplo n.º 2
0
        public static void SeedUsers(TicketingSystemDbContext context)
        {
            var user = new User()
            {
                Username  = "******",
                Password  = HashPassword("123"),
                FirstName = "test",
                LastName  = "testenov",
                Email     = "*****@*****.**"
            };

            var user1 = new User()
            {
                Username  = "******",
                Password  = HashPassword("123"),
                FirstName = "test",
                LastName  = "testenov",
                Email     = "*****@*****.**"
            };


            var user2 = new User()
            {
                Username  = "******",
                Password  = HashPassword("123"),
                FirstName = "test",
                LastName  = "testenov",
                Email     = "*****@*****.**"
            };


            var user3 = new User()
            {
                Username  = "******",
                Password  = HashPassword("123"),
                FirstName = "test",
                LastName  = "testenov",
                Email     = "*****@*****.**"
            };


            var user4 = new User()
            {
                Username  = "******",
                Password  = HashPassword("123"),
                FirstName = "test",
                LastName  = "testenov",
                Email     = "*****@*****.**"
            };

            var admin = new User()
            {
                Username     = "******",
                Password     = HashPassword("123"),
                FirstName    = "test",
                LastName     = "testenov",
                Email        = "*****@*****.**",
                Role         = AccountRole.Administrator,
                AccountState = AccountState.Approved
            };

            var support = new User()
            {
                Username     = "******",
                Password     = HashPassword("123"),
                FirstName    = "Support",
                LastName     = "Supportev",
                Email        = "*****@*****.**",
                Role         = AccountRole.Support,
                AccountState = AccountState.Approved
            };

            context.AddRange(user, user1, user2, user3, user4, admin, support);
            context.SaveChanges();
        }
Ejemplo n.º 3
0
 public AdminProjectService(DATA.TicketingSystemDbContext db)
 {
     this.db = db;
 }
Ejemplo n.º 4
0
 public TicketService(DATA.TicketingSystemDbContext db)
 {
     this.db = db;
 }
Ejemplo n.º 5
0
 public UserService()
 {
     _context = new DATA.TicketingSystemDbContext();
 }
Ejemplo n.º 6
0
 public UserService(DATA.TicketingSystemDbContext db, IUserStore <DATA_MODELS.User> store, IOptions <IdentityOptions> optionsAccessor, IPasswordHasher <DATA_MODELS.User> passwordHasher, IEnumerable <IUserValidator <DATA_MODELS.User> > userValidators, IEnumerable <IPasswordValidator <DATA_MODELS.User> > passwordValidators, ILookupNormalizer keyNormalizer, IdentityErrorDescriber errors, IServiceProvider services, ILogger <UserManager <DATA_MODELS.User> > logger) : base(store, optionsAccessor, passwordHasher, userValidators, passwordValidators, keyNormalizer, errors, services, logger)
 {
     this.db = db;
 }
Ejemplo n.º 7
0
 public AdminUserService(DATA.TicketingSystemDbContext db)
 {
     this.db = db ?? throw new ArgumentNullException(nameof(db));
 }
Ejemplo n.º 8
0
 public ProjectService()
 {
     _context = new DATA.TicketingSystemDbContext();
 }
Ejemplo n.º 9
0
 public MessageService()
 {
     _context = new DATA.TicketingSystemDbContext();
 }