Chronozoom.Entities.Storage.SetPrefix C# (CSharp) Метод

SetPrefix() публичный Метод

Add new prefix and associated namespace with it.
public SetPrefix ( string prefixStr, string fullStr ) : bool
prefixStr string Prefix
fullStr string Namespace
Результат bool
        public bool SetPrefix(string prefixStr, string fullStr)
        {
            var val = TriplePrefixes.FirstOrDefault(x => x.Prefix == prefixStr || x.Namespace == fullStr);
            if (val == null)
            {
                var t = new TriplePrefix
                    {
                        Namespace = fullStr,
                        Prefix = prefixStr
                    };
                TriplePrefixes.Add(t);
                SaveChanges();
                return true;
            }
            return false;
        }