public AppServersRoutingProfiles.AppServersRoutingProfile Put(int subscriptionId, int appServersRoutingProfileId, [FromBody] AppServersRoutingProfiles.AppServersRoutingProfile appServersRoutingProfile) { var profile = _routingProfiles .Single(r => r.href == $"thingpark/wireless/rest/subscriptions/{subscriptionId}/appServersRoutingProfiles/{appServersRoutingProfileId}"); profile.name = appServersRoutingProfile.name; return(appServersRoutingProfile); }
public AppServersRoutingProfiles.AppServersRoutingProfile Post(int subscriptionId, [FromBody] AppServersRoutingProfiles.AppServersRoutingProfile appServersRoutingProfile) { var newProfile = new AppServersRoutingProfiles.Brief { name = appServersRoutingProfile.name, href = $"thingpark/wireless/rest/subscriptions/{subscriptionId}/appServersRoutingProfiles/{++_profileSequenceId}" }; _routingProfiles.Add(newProfile); Response.Headers.Add("Location", newProfile.href); return(appServersRoutingProfile); }