Exemple #1
0
        private static List <Process> SeedProcesses(ProTickDatabaseContext context, int amount)
        {
            var processes = GetSeededProcesses(amount);

            processes.ForEach(x => context.Add(x));
            context.SaveChanges();
            return(processes);
        }
Exemple #2
0
        private static List <EmployeeTeam> SeedEmployeeTeams(ProTickDatabaseContext context, int amount, List <Employee> emps, List <Team> teams)
        {
            var empTeams = GetSeededEmployeeTeams(amount, emps, teams);

            empTeams.ForEach(x => context.Add(x));
            context.SaveChanges();
            return(empTeams);
        }
Exemple #3
0
        private static List <State> SeedStates(ProTickDatabaseContext context, int amount)
        {
            var states = GetSeededStates(amount);

            states.ForEach(x => context.Add(x));
            context.SaveChanges();
            return(states);
        }
Exemple #4
0
        private static List <Team> SeedTeams(ProTickDatabaseContext context, int amount)
        {
            var teams = GetSeededTeams(amount);

            teams.ForEach(x => context.Add(x));
            context.SaveChanges();
            return(teams);
        }
Exemple #5
0
        private static List <Employee> SeedEmployees(ProTickDatabaseContext context, int amount, List <Address> addresses, List <Role> roles)
        {
            var employees = GetSeededEmployees(amount, addresses, roles);

            employees.ForEach(x => context.Add(x));
            context.SaveChanges();
            return(employees);
        }
Exemple #6
0
        private static List <Ticket> SeedTickets(ProTickDatabaseContext context, int amount, List <State> states, List <Subprocess> subprocesses)
        {
            var tickets = GetSeededTickets(amount, states, subprocesses);

            tickets.ForEach(x => context.Add(x));
            context.SaveChanges();
            return(tickets);
        }
Exemple #7
0
        private static List <ParentChildRelation> SeedParentChildRelations(ProTickDatabaseContext context, int amount, List <Subprocess> children, List <Subprocess> parents)
        {
            var parentChildRelations = GetSeededParentChildRelations(amount, children, parents);

            parentChildRelations.ForEach(x => context.Add(x));
            context.SaveChanges();
            return(parentChildRelations);
        }
Exemple #8
0
        private static List <Subprocess> SeedSubprocesses(ProTickDatabaseContext context, int amount, List <Process> processes, List <Team> teams)
        {
            var subprocesses = GetSeededSubprocesses(amount, processes, teams);

            subprocesses.ForEach(x => context.Add(x));
            context.SaveChanges();
            return(subprocesses);
        }