예제 #1
0
        public EmployeeController(AzureDatabaseContext context)
        {
            _context = context;

            if (_context.Employees.Count() == 0)
            {
                _context.Employees.Add(new Employee("Derick", "Gross", 5, "Development"));
                _context.SaveChanges();
            }
        }
예제 #2
0
        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();
            }
        }
예제 #3
0
 public UserService(AzureDatabaseContext context)
 {
     _context = context;
 }
예제 #4
0
 public UserController(AzureDatabaseContext context, IUserService userService, IConfiguration configuration)
 {
     _userService   = userService;
     _configuration = configuration;
 }