예제 #1
0
        public void Share(string email, DGSharePermisson permission)
        {
            DGShare share = DGShare.ByEmailAndDiagram(email, ID).Single();

            if (share == null)
            {
                share = new DGShare()
                {
                    DiagramID = ID,
                    Email     = email
                };
            }

            share.Permission = permission;
            share.Save();
        }
예제 #2
0
 public void Unshare(string email)
 {
     DGShare.ByEmailAndDiagram(email, ID).ForEach(x => x.Delete());
 }