public ActionResult Delete(Guid @id) { var command = new DeleteNewsCommand { Id = @id }; Configuration.Instance().Bus.Handle(command); return this.Index(); }
public void Handle(DeleteNewsCommand command) { var news = _repository.GetById<News>(command.Id); news.Delete(); _repository.Save(news); }