/// <summary> /// Creates a new many-to-many relationship between a user and a resource. /// </summary> /// <param name="user">The involved user.</param> /// <param name="resource">The involved resource.</param> public UserResource(GirafUser user, Pictogram pictogram) { this.OtherKey = user.Id; this.Other = user; this.PictogramKey = pictogram.Id; this.Pictogram = pictogram; pictogram.LastEdit = DateTime.Now; Other.Resources.Add(this); pictogram.Users.Add(this); }
public void AddGuardian(GirafUser guardian) { this.Guardians.Add(new GuardianRelation(guardian, this)); }
public void AddCitizen(GirafUser citizen) { this.Citizens.Add(new GuardianRelation(this, citizen)); }