public HttpResponseMessage GetCountryState([FromBody] MasterCountryState objstate)
 {
     try
     {
         CountryStateContext objStateContext = new CountryStateContext();
         IEnumerable <MasterCountryState> maritalStatuses = objStateContext.GetCountryState(objstate);
         return(Request.CreateResponse(HttpStatusCode.OK, maritalStatuses));
     }
     catch (Exception ex)
     {
         //objErrorLogServices.LogError("Client", "GetClient", "", "", ex.Message.ToString());
         return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, "Internal Server Error"));
     }
 }
 public IEnumerable <MasterCountryState> GetCountryState(MasterCountryState objStatus)
 {
     try
     {
         using (sqlConnection = SqlUtility.GetConnection())
         {
             IEnumerable <MasterCountryState> GetCountryState = sqlConnection.Query <MasterCountryState>("Usp_GetMstStateList", commandType: CommandType.StoredProcedure).ToList();
             return(GetCountryState);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }