public bool UpdateAddress(int id, RestaurantAddress address) { Restaurant rest = dbContext.Restaurants.Find(id); RestaurantAddress restAdd = dbContext.RestaurantAddresses.Where(addr => addr.RestaurantId == id).SingleOrDefault(); restAdd.Latitude = address.Latitude; restAdd.Longitude = address.Longitude; restAdd.FormattedAddress = address.FormattedAddress; RestaurantAddressRepositroy restAddRepo = new RestaurantAddressRepositroy(); return(restAddRepo.Update(restAdd, restAdd.Id)); }
public RestaurantAddressService() { this.restAddRepo = new RestaurantAddressRepositroy(); }