diff --git a/CodeOnlyStoredProcedure/StoredProcedureParameters/InputOutputParameter.cs b/CodeOnlyStoredProcedure/StoredProcedureParameters/InputOutputParameter.cs index 54abdc4..0d6d830 100644 --- a/CodeOnlyStoredProcedure/StoredProcedureParameters/InputOutputParameter.cs +++ b/CodeOnlyStoredProcedure/StoredProcedureParameters/InputOutputParameter.cs @@ -20,7 +20,7 @@ public InputOutputParameter(string name, Action setter, object value, Db Contract.Requires(!string.IsNullOrWhiteSpace(name)); Contract.Requires(setter != null); - ParameterName = name.StartsWith("@") ? name.Substring(1) : name; + ParameterName = name; this.Value = value; this.DbType = dbType; this.setter = setter; diff --git a/CodeOnlyStoredProcedure/StoredProcedureParameters/InputParameter.cs b/CodeOnlyStoredProcedure/StoredProcedureParameters/InputParameter.cs index 26579fd..e2eef6f 100644 --- a/CodeOnlyStoredProcedure/StoredProcedureParameters/InputParameter.cs +++ b/CodeOnlyStoredProcedure/StoredProcedureParameters/InputParameter.cs @@ -12,7 +12,7 @@ internal class InputParameter : IInputStoredProcedureParameter public InputParameter(string name, object value, DbType? dbType = null) { Value = value; - ParameterName = name.StartsWith("@") ? name.Substring(1) : name; + ParameterName = name; DbType = dbType; } diff --git a/CodeOnlyStoredProcedure/StoredProcedureParameters/OutputParameter.cs b/CodeOnlyStoredProcedure/StoredProcedureParameters/OutputParameter.cs index d0ae40e..895f051 100644 --- a/CodeOnlyStoredProcedure/StoredProcedureParameters/OutputParameter.cs +++ b/CodeOnlyStoredProcedure/StoredProcedureParameters/OutputParameter.cs @@ -19,7 +19,7 @@ public OutputParameter(string name, Action setter, DbType? dbType = null Contract.Requires(!string.IsNullOrWhiteSpace(name)); Contract.Requires(setter != null); - this.ParameterName = name.StartsWith("@") ? name.Substring(1) : name; + this.ParameterName = name; this.setter = setter; this.DbType = dbType; this.Size = size; diff --git a/CodeOnlyStoredProcedure/StoredProcedureParameters/TableValuedParameter.cs b/CodeOnlyStoredProcedure/StoredProcedureParameters/TableValuedParameter.cs index 050ce16..12e89e3 100644 --- a/CodeOnlyStoredProcedure/StoredProcedureParameters/TableValuedParameter.cs +++ b/CodeOnlyStoredProcedure/StoredProcedureParameters/TableValuedParameter.cs @@ -26,7 +26,7 @@ public TableValuedParameter(string name, IEnumerable values, Type valueType, str Contract.Requires(!string.IsNullOrWhiteSpace(tableTypeName)); Contract.Requires(!string.IsNullOrWhiteSpace(tableTypeSchema)); - ParameterName = name.StartsWith("@") ? name.Substring(1) : name; + ParameterName = name; this.values = values; this.valueType = valueType; this.TypeName = string.Format("[{0}].[{1}]", tableTypeSchema, tableTypeName); diff --git a/CodeOnlyTests/StoredProcedureParameters/InputOutputParameterTests.cs b/CodeOnlyTests/StoredProcedureParameters/InputOutputParameterTests.cs index 5845479..fafd41b 100644 --- a/CodeOnlyTests/StoredProcedureParameters/InputOutputParameterTests.cs +++ b/CodeOnlyTests/StoredProcedureParameters/InputOutputParameterTests.cs @@ -90,11 +90,5 @@ public void NullValueToStringReturnsCorrectString() { new InputOutputParameter("Foo", o => { }, null).ToString().Should().Be("[InOut] @Foo = '{null}'"); } - - [TestMethod] - public void ToStringDoesNotDisplayExtraAts() - { - new InputOutputParameter("@Foo", o => { }, null).ToString().Should().Be("[InOut] @Foo = 'Bar'"); - } } } diff --git a/CodeOnlyTests/StoredProcedureParameters/InputParameterTests.cs b/CodeOnlyTests/StoredProcedureParameters/InputParameterTests.cs index 6526991..ed62e80 100644 --- a/CodeOnlyTests/StoredProcedureParameters/InputParameterTests.cs +++ b/CodeOnlyTests/StoredProcedureParameters/InputParameterTests.cs @@ -76,11 +76,5 @@ public void NullValueToStringReturnsCorrectString() { new InputParameter("Foo", null).ToString().Should().Be("@Foo = '{null}'"); } - - [TestMethod] - public void ToStringDoesNotDisplayExtraAts() - { - new InputParameter("@Foo", "Bar").ToString().Should().Be("@Foo = 'Bar'"); - } } } diff --git a/CodeOnlyTests/StoredProcedureParameters/OutputParameterTests.cs b/CodeOnlyTests/StoredProcedureParameters/OutputParameterTests.cs index 7cd0660..28a7abf 100644 --- a/CodeOnlyTests/StoredProcedureParameters/OutputParameterTests.cs +++ b/CodeOnlyTests/StoredProcedureParameters/OutputParameterTests.cs @@ -44,11 +44,5 @@ public void ToStringRepresentsTheParameter() { new OutputParameter("Foo", o => { }).ToString().Should().Be("[Out] @Foo"); } - - [TestMethod] - public void ToStringDoesNotDisplayExtraAts() - { - new OutputParameter("@Foo", o => { }).ToString().Should().Be("[Out] @Foo"); - } } } diff --git a/CodeOnlyTests/StoredProcedureParameters/TableValuedParameterTests.cs b/CodeOnlyTests/StoredProcedureParameters/TableValuedParameterTests.cs index 272b143..8b545c5 100644 --- a/CodeOnlyTests/StoredProcedureParameters/TableValuedParameterTests.cs +++ b/CodeOnlyTests/StoredProcedureParameters/TableValuedParameterTests.cs @@ -83,13 +83,6 @@ public void ToStringRepresentsTheParameter() .Should().Be(string.Format("@Foo = IEnumerable<{0}> (1 items)", typeof(TVP))); } - [TestMethod] - public void ToStringDoesNotDisplayExtraAts() - { - new TableValuedParameter("@Foo", new[] { new TVP(42) }, typeof(TVP), "CustomInt", "Schema").ToString() - .Should().Be(string.Format("@Foo = IEnumerable<{0}> (1 items)", typeof(TVP))); - } - private class TVP { public int Int { get; set; }