/// <summary> /// /// </summary> /// <returns></returns> private bool GetWebApiResponseUtf8Bom() { string value = ConfigurationManager.AppSettings["WebApiResponseUtf8Bom"]; if (string.IsNullOrWhiteSpace(value)) { return(false); } ExtBooleanConverter booleanConverter = new ExtBooleanConverter(); return((bool)booleanConverter.ConvertFrom(value)); }
/// <summary> /// /// </summary> /// <param name="id"></param> /// <returns></returns> public bool Delete(string id) { var apiRequestHttp = new ApiRequestHttp(); var requestAll = new { metadata = new { requestid = "DEL01" }, request = new { id = id } }; apiRequestHttp.HttpPostSync(@"http://localhost/BookServer/BookService.svc/Delete", requestAll); var json = apiRequestHttp.OutputJson; var result = ApiRequestHttp.Deserialize <ResponseObject <ResponseMetadata, ApiDeleteBookWithIdResponse> >(json); ExtBooleanConverter booleanConverter = new ExtBooleanConverter(); return((bool)booleanConverter.ConvertFrom(result.Response.Result)); }