public int InsertState(State theState) { string Context = this.GetType().FullName.ToString(); try { return(StateIntegration.InsertState(theState)); } catch (Exception ex) { throw (new Exception(Context, ex)); } }
public List <State> GetAllStatesByCountryId(int countryId) { //The below piece of code is working fine and should be un commented before after adding the states to the table //string UniqueKey = "GetAllStatesByCountryId_" + countryId.ToString(); //if(HttpRuntime.Cache[UniqueKey] == null) //{ // List<State> StateList = StateIntegration.GetAllStatesByCountryId(countryId); // HttpRuntime.Cache[UniqueKey] = StateList; //} //return (List<State>)(HttpRuntime.Cache[UniqueKey]); string Context = this.GetType().FullName.ToString(); try { return(StateIntegration.GetAllStatesByCountryId(countryId)); } catch (Exception ex) { throw (new Exception(Context, ex)); } }