public void Add(Address model) { using (var session = NhibernateHelper.OpenSession()) using (var transaction = session.BeginTransaction()) { session.Save(model); transaction.Commit(); } }
public void Can_add_new_address() { var address = new Address() { Id = 1, CreatedByUserId = 0, CreatedDate = new DateTime(2013, 1, 1), ModifiedByUserId = 0, ModifiedDate = new DateTime(2013, 1, 1), AddressLine1 = "address1", AddressLine2 = "address2", AddressLine3 = "address3", City = "city", State = "ST", Zip = "44444", Description = "a new address", Geocode = "1.1234567890" }; var repo = new Dig.Data.Repositories.AddressRespository(); repo.Add(address); }
public void AddAddress(Address address) { }