Ejemplo n.º 1
0
        public IActionResult AddTestRecords()
        {
            Company company = new Company()
            {
                Name       = "Test" + Guid.NewGuid().ToString(),
                Address    = "test address",
                City       = "test city",
                PostalCode = "test postalCode",
                State      = "test state",
                Employees  = new List <Employee>()
            };

            company.Employees.Add(new Employee()
            {
                Email = "test Email",
                Name  = "Test Name " + Guid.NewGuid().ToString(),
                Phone = " test phone",
                Title = "Test Manager"
            });

            company.Employees.Add(new Employee()
            {
                Email = "test Email 2",
                Name  = "Test Name 2" + Guid.NewGuid().ToString(),
                Phone = " test phone 2",
                Title = "Test Manager 2"
            });

            _bonRepo.AddTestCompanyWithEmployeeWithTransaction(company);

            return(RedirectToAction(nameof(Index)));
        }