public HttpResponseMessage ForgetPassword(ForgetCls model) { try { DataSet ds = null; ds = blObj.ForgetPassword(model); APIResponse response = new APIResponse(); if (ds.Tables[0].Rows[0]["StatusCode"].ToString() == "200") { string linkdata = ds.Tables[0].Rows[0]["UUID"].ToString(); mail.forgetmail(linkdata, model.userid, ds.Tables[0].Rows[0]["ID"].ToString()); } response.ResponseCode = ds.Tables[0].Rows[0]["StatusCode"].ToString(); response.ResponseMessage = ds.Tables[0].Rows[0]["Message"].ToString(); return(Request.CreateResponse(HttpStatusCode.OK, response)); } catch (Exception ex) { return(Request.CreateResponse(HttpStatusCode.ExpectationFailed, ex)); } }