Method Update
Update(UpdateChemTypeOperationContract)
Update an existing chemical type definition
[OperationContract]
[FaultContract(typeof(DbFaultContract))]
[FaultContract(typeof(ChemTypeNotFoundContract))]
[FaultContract(typeof(ValidationFaultContract))]
[SwaggerWcfTag("Chemicals", false)]
[SwaggerWcfPath(null, null, null, null, null, false, null, Summary = "Update an existing chemical definition", Description = "Attempts to update an existing chemical definition, and if successful, raises the corresponding events (untested)")]
[WebInvoke(UriTemplate = "Definitions", Method = "PUT", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
[SwaggerWcfResponse(StatusCode = HttpStatusCode.OK, Description = "Success")]
[SwaggerWcfResponse(StatusCode = HttpStatusCode.InternalServerError, Description = "An unexpected error occurred while processing the request.", Type = typeof(JsonErrorMessage))]
[SwaggerWcfResponse(StatusCode = HttpStatusCode.NotFound, Description = "No chemical was found matching the provided 'ID'", Type = typeof(JsonErrorMessage))]
[SwaggerWcfResponse(StatusCode = HttpStatusCode.BadRequest, Description = "Fault exception", Type = typeof(JsonErrorMessage))]
void Update(UpdateChemTypeOperationContract chemTypeUpdate)
Parameters
chemTypeUpdate
UpdateChemTypeOperationContractContains the chemical type definition to save (using the user-provided credentials)
Exceptions
- ChemTypeNotFoundContract
This exception would be thrown if the given code is not found in the database