public void Update(Zipcode zipcode) { var oldZip = _zipcodes.Where(z => z.ZipCodeID == zipcode.ZipCodeID).FirstOrDefault(); if (oldZip != null) { _zipcodes.Remove(oldZip); _zipcodes.Add(zipcode); _ds.Update(zipcode); } }
private void Update(string zipcode, string city, string state, int businessID) { Zipcode zip = new Zipcode(); zip.ZipCode = zipcode; zip.City = city; zip.State = state; zip.Business = businessID; using (TechCareerFair.DAL.ZipDAL.ZipDatabaseDataService ds = new ZipDAL.ZipDatabaseDataService()) { ds.Update(zip, businessID); } }