Table of Contents

Method Get

Namespace
Everest.Service.ChemTypes
Assembly
Everest.Service.dll

Get(string)

Returns the chemical definition associated with the given code if one is found or ChemTypeNotFoundContract is thrown otherwise

[OperationContract]
[FaultContract(typeof(DbFaultContract))]
[FaultContract(typeof(ChemTypeNotFoundContract))]
[FaultContract(typeof(ValidationFaultContract))]
[SwaggerWcfTag("Chemicals", false)]
[SwaggerWcfPath(null, null, null, null, null, false, null, Summary = "Get a chemical definition", Description = "Get the chemical definition matching the specified code")]
[WebGet(UriTemplate = "Definitions/{code}", 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.BadRequest, Description = "Fault exception", Type = typeof(JsonErrorMessage))]
ChemTypeInfoContract Get(string code)

Parameters

code string

The code associated with the target chemical definition

Returns

ChemTypeInfoContract

The chemical definition corresponding to the given code

Exceptions

ChemTypeNotFoundContract

This exception would be thrown if the given code is not found in the database