// PUT api/organisations/{id} public IHttpActionResult Put(Guid id, [FromBody] OrganisationDTO value) { if (id == Guid.Empty) { return(BadRequest("id is empty")); } var organisation = Organisations.Find(id); if (organisation == null) { return(NotFound()); } organisation.Name = value.Name; organisation.SubscriptionEnabled = value.SubscriptionEnabled; organisation.SubscriptionMonthlyRate = value.SubscriptionMonthlyRate; organisation.AddressLine1 = value.AddressLine1; organisation.AddressLine2 = value.AddressLine2; organisation.Town = value.Town; organisation.County = value.County; organisation.Postcode = value.Postcode; organisation.TelNumber = value.TelNumber; try { Organisations.InsertOrUpdate(organisation); UnitOfWork.Save(); MemoryCacher.DeleteStartingWith(CACHE_KEY); return(Ok()); } catch (Exception ex) { return(InternalServerError(ex)); } }