public IHttpActionResult Getemail_templatesPaging(int pageSize, int pageNumber) { ResponseDataDTO <PagedResults <email_template> > response = new ResponseDataDTO <PagedResults <email_template> >(); try { response.Code = HttpCode.OK; response.Message = MessageResponse.SUCCESS; response.Data = _email_templateservice.CreatePagedResults(pageNumber, pageSize); } catch (Exception ex) { response.Code = HttpCode.INTERNAL_SERVER_ERROR; response.Message = ex.Message; response.Data = null; Console.WriteLine(ex.ToString()); } return(Ok(response)); }