public Customer Get(long id)
        {
            CustomerPercistance pp       = new CustomerPercistance();
            Customer            Customer = pp.getCustomer(id);

            return(Customer);
        }
        public HttpResponseMessage checkLogin([FromBody] Customer value)
        {
            bool recordExisted = false;
            HttpResponseMessage response;
            CustomerPercistance pp = new CustomerPercistance();

            recordExisted = pp.checkLogin(value.contactNo, value.password);
            if (recordExisted)
            {
                response = Request.CreateResponse(HttpStatusCode.NoContent);
            }

            else
            {
                response = Request.CreateResponse(HttpStatusCode.NotFound);
            }
            return(response);
        }
        public HttpResponseMessage Delete(long id)
        {
            CustomerPercistance pp = new CustomerPercistance();
            bool recordExisted     = false;

            recordExisted = pp.deleteCustomer(id);
            HttpResponseMessage response;

            if (recordExisted)
            {
                response = Request.CreateResponse(HttpStatusCode.NoContent);
            }

            else
            {
                response = Request.CreateResponse(HttpStatusCode.NotFound);
            }
            return(response);
        }
        public HttpResponseMessage Put(long id, [FromBody] Customer value)
        {
            CustomerPercistance pp = new CustomerPercistance();
            bool recordExisted     = false;

            recordExisted = pp.updateCustomer(id, value);
            HttpResponseMessage response;

            if (recordExisted)
            {
                response = Request.CreateResponse(HttpStatusCode.NoContent);
            }

            else
            {
                response = Request.CreateResponse(HttpStatusCode.NotFound);
            }
            return(response);
        }
        public HttpResponseMessage Post([FromBody] Customer value)
        {
            bool recordExisted     = false;
            CustomerPercistance pp = new CustomerPercistance();

            recordExisted = pp.saveCustomer(value);
            HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.Created);

            if (recordExisted)
            {
                response = Request.CreateResponse(HttpStatusCode.Found);
            }

            else
            {
                response = Request.CreateResponse(HttpStatusCode.Created);
            }
            return(response);
        }
        public ArrayList Get()
        {
            CustomerPercistance pp = new CustomerPercistance();

            return(pp.getCustomer());
        }