public IHttpActionResult CreateRestaurantAddress(long restaurantId, RestaurantAddressModel address) { try { return Ok(RestaurantAddressManager.CreateRestaurantAddress(restaurantId, address.Street1, address.Street2, address.City, address.Region, address.PostalCode)); } catch (Exception ex) { logger.Error(ex); return InternalServerError(); } }
public IHttpActionResult UpdateRestaurantAddress(long restaurantId, long restaurantaddressId, RestaurantAddressModel address) { try { return Ok(RestaurantAddressManager.UpdateRestaurantAddress(restaurantId, restaurantaddressId, address.Street1, address.Street2, address.City, address.Region, address.PostalCode)); } catch (PersistanceException pex) { logger.Error(pex); return NotFound(); } catch (Exception ex) { logger.Error(ex); return InternalServerError(); } }