public async Task <HttpResponseMessage> GetAllSubCategorsUsingID(int SubCatId) { RepoBase <Level2> specmaster; try { specmaster = new RepoBase <Level2>("Level2"); string clientAddress = HttpContext.Current.Request.UserHostAddress; return(Request.CreateResponse <Level2>(HttpStatusCode.OK, await specmaster.Find(SubCatId))); } catch (Exception ex) { specmaster = null; LogHelper.WriteLog(HttpContext.Current.Request, ex, RequestContext.Principal.Identity.Name); return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex)); } }