public ServiceParishObject StandardSearch(ParishSearchFilter parishSearchFilter,DataShaping shaper, IValidator validator = null)
        {
            if (validator != null)
                _validator = validator;

            var serviceParishObject = new ServiceParishObject();

            string retVal = "";

            try
            {

                serviceParishObject.serviceParishs = _parishsDal.GetParishByFilter(parishSearchFilter, shaper);
                serviceParishObject.Batch = shaper.RecordStart;
                serviceParishObject.BatchLength = shaper.RecordPageSize;
                serviceParishObject.Total = shaper.TotalRecords;

                serviceParishObject.serviceParishs = serviceParishObject.serviceParishs;

            }
            catch (Exception ex1)
            {
                retVal = "Exception: " + ex1.Message;
            }
            finally
            {
                if (retVal != "") retVal += Environment.NewLine;

                serviceParishObject.ErrorStatus = retVal;
            }

            return serviceParishObject;
        }
        public IHttpActionResult GetParishs(string deposited, string name, string county, string pno, string psize, string sortcol)
        {
            //string pno, string psize, string sortcol = ""
            string retVal = "";

            var psf = new ParishSearchFilter
            {
                County = county ?? "",
                Deposited = deposited?? "",
                Name = name??""
            };

            var result = new ServiceParishObject();

            try
            {
                result = _parishSearch.StandardSearch(psf, new DataShaping() { RecordPageSize = psize.ToInt32(), RecordStart = pno.ToInt32(), Column = sortcol });
            }
            catch (Exception ex1)
            {
                retVal = ex1.Message;
            }

            if (retVal != "")
            {
                return Content(HttpStatusCode.BadRequest, retVal);
            }

            return Ok(result);
        }