public void SetUp() { _dbUtil.Bind(); using (var session = SessionManager.SessionFactory.OpenSession()) { var active = new Tire { Name = "Pirelli" }; session.Save(active); var inactive = new Tire { Name = "Goodyear" }; session.Save(inactive); var car = new Car { Name = "Gol", Year = 30, Tire = active }; session.Save(car); } }
public void SetUp() { _dbUtil.Bind(); using (var session = SessionManager.SessionFactory.OpenSession()) { var active = new Status { Name = "Ativo" }; session.Save(active); var inactive = new Status { Name = "Inativo" }; session.Save(inactive); var user = new User { Name = "Adriano", Age = 30, Status = active }; session.Save(user); } Repository = new UserRepository(); }