public IEnumerable <StateCode> GetStates(string code) { using (var db_con = new SqlExpContext()) { CountryCode countryCode = db_con.CountryCodes.FirstOrDefault(f => f.CountryAbbr.ToUpper() == code.ToUpper()); List <StateCode> rtn_obj = db_con.StateCodes.Where(w => w.CountryCodeId == countryCode.CountryCodeId).ToList(); return(rtn_obj); } }
public ReducerRepository(SqlExpContext context) { _context = context; }