public static void AddLocationIndustries(StudioDbContext context) { var locationId = CommandArrangeHelper.GetLocationId(context, null, null); var industryId = CommandArrangeHelper.GetIndustryId(context); var locationIndustry = new LocationIndustry { LocationId = locationId, IndustryId = industryId, Description = "Good!" }; context.LocationIndustries.Add(locationIndustry); context.SaveChanges(); }
public static void AddEmployees(StudioDbContext context) { var industryId = CommandArrangeHelper.GetIndustryId(context); var serviceId = CommandArrangeHelper.GetServiceId(context, industryId); var addressId = CommandArrangeHelper.GetAddressId(context, null); var locationId = CommandArrangeHelper.GetLocationId(context, null, addressId); var employee = new Employee { Id = 1, FirstName = GConst.ValidName, LastName = GConst.ValidName, LocationId = locationId }; context.Employees.Add(employee); var employeeService = new EmployeeService { ServiceId = serviceId, EmployeeId = employee.Id }; context.EmployeeServices.Add(employeeService); context.SaveChanges(); }