Blog.DAL.UstawieniaServices.addSettins C# (CSharp) Méthode

addSettins() public méthode

public addSettins ( Models model ) : bool
model Models
Résultat bool
        public bool addSettins(Models.UstawieniaModel model)
        {
            #region walidacja
            if (String.IsNullOrEmpty(model.key)) throw new ArgumentException("Klucz nie może być pusty", model.key);
            if (String.IsNullOrWhiteSpace(model.key)) throw new ArgumentException("Klucz nie może zawierać białych znaków", model.key);
            if (existSettings(model.key)) throw new ArgumentException("Podany klucz: " + model.key + " już istnieje", model.key);

            if (String.IsNullOrEmpty(model.value)) throw new ArgumentException("Wartość nie może być pusta", model.value);
            #endregion

            throw new NotImplementedException();
        }