public async Task <IActionResult> SetLocationAddress([FromBody] SetLocationAddressRequest request) { if (!ModelState.IsValid) { //NotifyModelStateErrors(); return(Ok(false)); } Guid siteId = request.SiteId; Guid locationId = request.Id; string streetAddress = request.StreetAddress; string city = request.City; string stateProvince = request.StateProvince; string postalCode = request.PostalCode; string countryCode = request.CountryCode; await _businessService.SetLocationAddress(siteId, locationId, streetAddress, city, stateProvince, postalCode, countryCode); return(CreatedAtAction(nameof(GetLocationById), new { siteId = siteId, locationId = locationId }, null)); }
public ActionResult SetLocationAddress([FromBody] SetLocationAddressRequest request) { if (!ModelState.IsValid) { //NotifyModelStateErrors(); return(Ok(false)); } Guid siteId = request.SiteId; Guid locationId = request.Id; string streetAddress = request.StreetAddress; string streetAddress2 = request.StreetAddress2; string city = request.City; string stateProvince = request.StateProvince; string postalCode = request.PostalCode; string countryCode = request.CountryCode; _businessInformationService.SetLocationAddress(siteId, locationId, streetAddress, streetAddress2, city, stateProvince, postalCode, countryCode); return(Ok()); }