コード例 #1
0
 public void Delete(DeleteHeritageCommand command)
 {
     _db.Connection().Execute(
         "spDeleteHeritage",
         new
     {
         id = command.Id
     },
         commandType: CommandType.StoredProcedure
         );
 }
コード例 #2
0
        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));
            }
        }
コード例 #3
0
 public ICommandResult Delete(DeleteHeritageCommand command)
 {
     return(_handler.Handle(command));
 }
コード例 #4
0
 public void Delete(DeleteHeritageCommand command)
 {
 }