private void DeletePost(int?id)
 {
     facade.Delete(new PostLightModel {
         Id = id
     });
     Load();
     mediator.Send(new PostOrCommentDeletedMessage());
 }
Ejemplo n.º 2
0
        public void Delete()
        {
            if (Model.Id != null)
            {
                try
                {
                    facade.Delete(Model);
                }
                catch
                {
                    messageBoxService.Show($"Deleting of {Model?.FirstName} {Model?.LastName} failed!", "Deleting failed", MessageBoxButton.OK);
                    throw;
                }

                Model = null;
            }
        }
Ejemplo n.º 3
0
 private void DeleteTeam(TeamModel obj)
 {
     facade.Delete(this.Model);
     this.Model = new TeamModel();
     mediator.Send(new MyTeamsUpdated());
 }