private static List <Process> SeedProcesses(ProTickDatabaseContext context, int amount) { var processes = GetSeededProcesses(amount); processes.ForEach(x => context.Add(x)); context.SaveChanges(); return(processes); }
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); }
private static List <State> SeedStates(ProTickDatabaseContext context, int amount) { var states = GetSeededStates(amount); states.ForEach(x => context.Add(x)); context.SaveChanges(); return(states); }
private static List <Team> SeedTeams(ProTickDatabaseContext context, int amount) { var teams = GetSeededTeams(amount); teams.ForEach(x => context.Add(x)); context.SaveChanges(); return(teams); }
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); }
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); }
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); }
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); }