public static BOLocalizationResource Get(string hash)
        {
            SqlConnection con = new SqlConnection(GetConnectionString());
            con.Open();
            try
            {
                SqlCommand cmd = new SqlCommand("P_LocalizationResource_GetByHash", con);
                cmd.CommandType = CommandType.StoredProcedure;
                SetCharParameter(cmd.Parameters, "@LRES_Hash", MAXIMUM_LENGTH_HASH, hash, false);
                SqlDataReader rdr = cmd.ExecuteReader(CommandBehavior.SingleResult);
                try
                {
                    if (rdr.Read())
                    {
                        BOLocalizationResource BusinessObject = new BOLocalizationResource(rdr);
                        return BusinessObject;
                    }
                    else
                    {
                        return null;
                    }

                }
                finally
                {
                    rdr.Close();
                }
            }
            finally
            {
                con.Close();
            }
        }
 public static BOLocalizationResource Get(string culture, string containerType, string container, string property, string type, string key, string defaultValue)
 {
     string hash = Md5Hash(culture, containerType, container, property, type, key);
     BOLocalizationResource localizationResource = Get(hash);
     if (localizationResource == null)
     {
         localizationResource = new BOLocalizationResource();
         localizationResource.Culture = culture;
         localizationResource.Container = container;
         localizationResource.ContainerType = containerType;
         localizationResource.Property = property;
         localizationResource.Type = type;
         localizationResource.Key = key;
         localizationResource.Description = defaultValue;
         localizationResource.Value = defaultValue;
         localizationResource.Hash = hash;
         localizationResource.Save();
     }
     return localizationResource;
 }
 public BOLocalizationResourceComparer(BOLocalizationResource.Columns column, BOLocalizationResource.SortDirections direction)
 {
     _column = column;
     _direction = direction;
 }
        public void Save(BOLocalizationResource localization)
        {
            _localizationResourceRepository.Save(localization);

            _cacheProvider.Remove<string>(localization.Hash);
        }