public EmployeeController(AzureDatabaseContext context) { _context = context; if (_context.Employees.Count() == 0) { _context.Employees.Add(new Employee("Derick", "Gross", 5, "Development")); _context.SaveChanges(); } }
public DependentController(AzureDatabaseContext context) { _context = context; if (_context.Dependents.Count() == 0) { _context.Dependents.Add(new Dependent { DependentId = 1, EmployeeId = 1, FirstName = "DeAnna", LastName = "Gross", Cost = 500, DiscountFactor = DeductionHelpers.CalculateDiscountFactor("DeAnna") }); _context.SaveChanges(); } }
public UserService(AzureDatabaseContext context) { _context = context; }
public UserController(AzureDatabaseContext context, IUserService userService, IConfiguration configuration) { _userService = userService; _configuration = configuration; }