Exemplo n.º 1
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            var targetUser = this.context.Users.Where(u => u.UserName == this.UsersDropdown.SelectedItem.Text).First();

            targetUser.Roles.Clear();
            this.context.SaveChanges();
            Notifier.AddErrorMessage(string.Format("User {0}, banned for further bookings!", targetUser.UserName));
        }