public Venue SaveVenue(Venue venue) { IVenueDao dao = DALFactory.CreateVenueDao(database); if (venue.Id != null && venue.Id > 0) { dao.Update(venue); return(venue); } venue = dao.Insert(venue); return(venue); }
public void TestUpdate() { IDatabase db = DALFactory.CreateDatabase(); IVenueDao dao = DALFactory.CreateVenueDao(db); Venue v = dao.findById(1); v.Description = "TEST-DESCRIPTION"; dao.Update(v); Venue result = dao.findById(1); Assert.AreEqual(result.Description, v.Description); }