示例#1
0
        public SPARQLRole addRole(string role, object id, object newId)
        {
            SPARQLRole roleObj = new SPARQLRole()
            {
                Role = role, Id = id, newId = newId
            };

            return(this.Add(roleObj));
        }
示例#2
0
        public SPARQLRole Add(SPARQLRole role)
        {
            var items = from query in this.Roles
                        where query.Role == role.Role
                        select query;

            if (items.Count <SPARQLRole>() == 0)
            {
                this.Roles.Add(role);
                return(role);
            }
            else
            {
                return(items.First <SPARQLRole>());
            }
        }