Exemplo n.º 1
0
        public void InsertPermission(Permission UserPermission)
        {
            try
            {
                Guid       RandomGuid = Guid.NewGuid();
                Permission permit     = new Permission
                {
                    UserGuid       = RandomGuid.ToString(),
                    UserRole       = UserPermission.UserRole,
                    UserRoleId     = -999,
                    DateEnrolled   = DateTime.Now,
                    MemberEnrolled = "Nick"
                };

                IdentityHelper.CreateUserPermission(permit.UserRole, permit.UserGuid);

                PermissionRepo.Insert(permit);
                PermissionRepo.Save();
            }
            catch (Exception ex)
            {
                Error.InsertError(ex);
            }
        }