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;
}