public CommandResult CadastrarTipoInscricao(TipoInscricao tipoInscricao) { try { _uow.BeginTransaction(); _uow.GetConnection().Execute( "dbo.spGravaTipoInscricao", new { Id = tipoInscricao.Id, Descricao = tipoInscricao.Descricao, Status = tipoInscricao.Status, AliasUsuario = tipoInscricao.AliasUsuario }, _uow.GetTransaction(), commandType: CommandType.StoredProcedure ); _uow.Commit(); return(new CommandResult(true, "Cadastro realizado com sucesso.", null)); } catch (Exception e) { _uow.Rollback(); return(new CommandResult(false, "Erro ao tentar realizar cadastro: " + e.Message, null)); } }