Ejemplo n.º 1
0
        public ActionResult Delete(int id)
        {
            AccountClient client = new AccountClient();

            client.Delete(id);
            return(RedirectToAction("Index"));
        }
Ejemplo n.º 2
0
        private void btnDelete_Click(object sender, EventArgs e)
        {
            int userId = Int32.Parse(txtId.Text);

            using (var context = new BookLotEntities())
            {
                User userToDelete = new User()
                {
                    Id = userId
                };
                AccountClient accountClient = new AccountClient();
                accountClient.Delete(userToDelete);
            }
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Delets user with given id.
 /// </summary>
 /// <param name="id">User id.</param>
 /// <returns>Returns true if user deletion was successfull, false otherwise.</returns>
 public ApiResult <bool> Delete(int id)
 {
     return(_client.Delete <bool>($"{_client.ResourceUrl}/Users/" + id));
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Deletes agenda's logo.
 /// </summary>
 /// <returns><c>true</c>.</returns>
 public ApiResult <bool> DeleteLogo()
 {
     return(_client.Delete <bool>(LogoUrl));
 }