Exemplo n.º 1
0
        private Result <int> DeleteDetail(CodeMapperDetailItem entity)
        {
            var sql = $@"DELETE FROM dbo.[CodeMapperDetails]
                         WHERE CodeMapperId = @CodeMapperId
                            AND ActionCodeId = @CodeMapperId;";

            return(_commandRepository.ExecuteSqlNonQuery(sql, new { CodeMapperId = entity.CodeMapperId, ActionCodeId = entity.ActionCodeId }));
        }
Exemplo n.º 2
0
        private Result <int> ResetDefault()
        {
            var sql = $@"UPDATE dbo.[CodeMappers]
                         SET IsDefault = 0";

            return(_commandRepository.ExecuteSqlNonQuery(sql, null));
        }