public void Delete(DeleteHeritageCommand command) { _db.Connection().Execute( "spDeleteHeritage", new { id = command.Id }, commandType: CommandType.StoredProcedure ); }
public ICommandResult Handle(DeleteHeritageCommand command) { string id = command.Id.ToString(); if (string.IsNullOrEmpty(id)) { AddNotification("Identifier", MessagesUtil.InvalidIdentifier); } if (Invalid) { return(new CommandResult(MessagesUtil.DeleteError, true)); } try { _repository.Delete(command); return(new CommandResult(MessagesUtil.DeletedSuccess, true)); } catch { return(new CommandResult(MessagesUtil.DeleteError, false)); } }
public ICommandResult Delete(DeleteHeritageCommand command) { return(_handler.Handle(command)); }
public void Delete(DeleteHeritageCommand command) { }