public JsonLocationType Update(JsonLocationType UpdatedLocationTypeJson) { LocationType updatedLocationType = UpdatedLocationTypeJson.ConvertToLocationType(); var fullResult = locationTypeService.Update(updatedLocationType); var jsonResult = new JsonLocationType(fullResult); return(jsonResult); }
public JsonLocationType Update(JsonLocationType UpdatedLocationTypeJson) { ////First, do properties //foreach (var jsonProp in UpdatedLocationTypeJson.Properties) //{ // LocationTypeProperty UpdatedProp = jsonProp.ConvertToLocationTypeProperty(); //} //then do LT LocationType UpdatedLocationType = UpdatedLocationTypeJson.ConvertToLocationType(); Repositories.LocationTypeRepo.Update(UpdatedLocationType); var FullResult = Repositories.LocationTypeRepo.GetByKey(UpdatedLocationType.Key); Repositories.LocationRepo.UpdateWithNewProps(FullResult.Key); var JsonResult = new JsonLocationType(FullResult); return(JsonResult); }