Skip to content

Commit 2bc267f

Browse files
Fixes of grammar typos (#1458)
Fixes of grammar typos
1 parent f4aec37 commit 2bc267f

11 files changed

+28
-28
lines changed

Dapper.Contrib/SqlMapperExtensions.Async.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ public static async Task<T> GetAsync<T>(this IDbConnection connection, dynamic i
3434
GetQueries[type.TypeHandle] = sql;
3535
}
3636

37-
var dynParms = new DynamicParameters();
38-
dynParms.Add("@id", id);
37+
var dynParams = new DynamicParameters();
38+
dynParams.Add("@id", id);
3939

4040
if (!type.IsInterface)
41-
return (await connection.QueryAsync<T>(sql, dynParms, transaction, commandTimeout).ConfigureAwait(false)).FirstOrDefault();
41+
return (await connection.QueryAsync<T>(sql, dynParams, transaction, commandTimeout).ConfigureAwait(false)).FirstOrDefault();
4242

43-
var res = (await connection.QueryAsync<dynamic>(sql, dynParms).ConfigureAwait(false)).FirstOrDefault() as IDictionary<string, object>;
43+
var res = (await connection.QueryAsync<dynamic>(sql, dynParams).ConfigureAwait(false)).FirstOrDefault() as IDictionary<string, object>;
4444

4545
if (res == null)
4646
return null;
@@ -68,7 +68,7 @@ public static async Task<T> GetAsync<T>(this IDbConnection connection, dynamic i
6868
}
6969

7070
/// <summary>
71-
/// Returns a list of entites from table "Ts".
71+
/// Returns a list of entities from table "Ts".
7272
/// Id of T must be marked with [Key] attribute.
7373
/// Entities created from interfaces are tracked/intercepted for changes and used by the Update() extension
7474
/// for optimal performance.
@@ -499,7 +499,7 @@ public async Task<int> InsertAsync(IDbConnection connection, IDbTransaction tran
499499

500500
var results = await connection.QueryAsync(sb.ToString(), entityToInsert, transaction, commandTimeout).ConfigureAwait(false);
501501

502-
// Return the key by assinging the corresponding property in the object - by product is that it supports compound primary keys
502+
// Return the key by assigning the corresponding property in the object - by product is that it supports compound primary keys
503503
var id = 0;
504504
foreach (var p in propertyInfos)
505505
{

Dapper.Contrib/SqlMapperExtensions.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -180,14 +180,14 @@ public static T Get<T>(this IDbConnection connection, dynamic id, IDbTransaction
180180
GetQueries[type.TypeHandle] = sql;
181181
}
182182

183-
var dynParms = new DynamicParameters();
184-
dynParms.Add("@id", id);
183+
var dynParams = new DynamicParameters();
184+
dynParams.Add("@id", id);
185185

186186
T obj;
187187

188188
if (type.IsInterface)
189189
{
190-
var res = connection.Query(sql, dynParms).FirstOrDefault() as IDictionary<string, object>;
190+
var res = connection.Query(sql, dynParams).FirstOrDefault() as IDictionary<string, object>;
191191

192192
if (res == null)
193193
return null;
@@ -213,16 +213,16 @@ public static T Get<T>(this IDbConnection connection, dynamic id, IDbTransaction
213213
}
214214
else
215215
{
216-
obj = connection.Query<T>(sql, dynParms, transaction, commandTimeout: commandTimeout).FirstOrDefault();
216+
obj = connection.Query<T>(sql, dynParams, transaction, commandTimeout: commandTimeout).FirstOrDefault();
217217
}
218218
return obj;
219219
}
220220

221221
/// <summary>
222-
/// Returns a list of entites from table "Ts".
222+
/// Returns a list of entities from table "Ts".
223223
/// Id of T must be marked with [Key] attribute.
224224
/// Entities created from interfaces are tracked/intercepted for changes and used by the Update() extension
225-
/// for optimal performance.
225+
/// for optimal performance.
226226
/// </summary>
227227
/// <typeparam name="T">Interface or type to create and populate</typeparam>
228228
/// <param name="connection">Open SqlConnection</param>
@@ -1007,7 +1007,7 @@ public int Insert(IDbConnection connection, IDbTransaction transaction, int? com
10071007

10081008
var results = connection.Query(sb.ToString(), entityToInsert, transaction, commandTimeout: commandTimeout).ToList();
10091009

1010-
// Return the key by assinging the corresponding property in the object - by product is that it supports compound primary keys
1010+
// Return the key by assigning the corresponding property in the object - by product is that it supports compound primary keys
10111011
var id = 0;
10121012
foreach (var p in propertyInfos)
10131013
{
@@ -1094,7 +1094,7 @@ public void AppendColumnNameEqualsValue(StringBuilder sb, string columnName)
10941094
}
10951095

10961096
/// <summary>
1097-
/// The Firebase SQL adapeter.
1097+
/// The Firebase SQL adapter.
10981098
/// </summary>
10991099
public partial class FbAdapter : ISqlAdapter
11001100
{

Dapper.ProviderTools/DbConnectionExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
namespace Dapper.ProviderTools
88
{
99
/// <summary>
10-
/// Helper utilties for working with database connections
10+
/// Helper utilities for working with database connections
1111
/// </summary>
1212
public static class DbConnectionExtensions
1313
{

Dapper.ProviderTools/DbExceptionExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
namespace Dapper.ProviderTools
88
{
99
/// <summary>
10-
/// Helper utilties for working with database exceptions
10+
/// Helper utilities for working with database exceptions
1111
/// </summary>
1212
public static class DbExceptionExtensions
1313
{
@@ -17,7 +17,7 @@ public static class DbExceptionExtensions
1717
public static bool IsNumber(this DbException exception, int number)
1818
=> exception != null && ByTypeHelpers.Get(exception.GetType()).IsNumber(exception, number);
1919

20-
20+
2121
private sealed class ByTypeHelpers
2222
{
2323
private static readonly ConcurrentDictionary<Type, ByTypeHelpers> s_byType

Dapper.Rainbow/Database.Async.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public partial class Table<T, TId>
3434
/// </summary>
3535
/// <param name="id">The Id of the record to update.</param>
3636
/// <param name="data">The new record.</param>
37-
/// <returns>The number of affeced rows.</returns>
37+
/// <returns>The number of affected rows.</returns>
3838
public Task<int> UpdateAsync(TId id, dynamic data)
3939
{
4040
List<string> paramNames = GetParamNames((object)data);

Dapper/CustomPropertyTypeMap.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public SqlMapper.IMemberMap GetConstructorParameter(ConstructorInfo constructor,
5252
/// Returns property based on selector strategy
5353
/// </summary>
5454
/// <param name="columnName">DataReader column name</param>
55-
/// <returns>Poperty member map</returns>
55+
/// <returns>Property member map</returns>
5656
public SqlMapper.IMemberMap GetMember(string columnName)
5757
{
5858
var prop = _propertySelector(_type, columnName);

Dapper/DefaultTypeMap.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ public SqlMapper.IMemberMap GetMember(string columnName)
147147
var backingFieldName = "<" + columnName + ">k__BackingField";
148148

149149
// preference order is:
150-
// exact match over underscre match, exact case over wrong case, backing fields over regular fields, match-inc-underscores over match-exc-underscores
150+
// exact match over underscore match, exact case over wrong case, backing fields over regular fields, match-inc-underscores over match-exc-underscores
151151
var field = _fields.Find(p => string.Equals(p.Name, columnName, StringComparison.Ordinal))
152152
?? _fields.Find(p => string.Equals(p.Name, backingFieldName, StringComparison.Ordinal))
153153
?? _fields.Find(p => string.Equals(p.Name, columnName, StringComparison.OrdinalIgnoreCase))

Dapper/DynamicParameters.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ protected void AddParameters(IDbCommand command, SqlMapper.Identity identity)
294294
}
295295
}
296296

297-
// note: most non-priveleged implementations would use: this.ReplaceLiterals(command);
297+
// note: most non-privileged implementations would use: this.ReplaceLiterals(command);
298298
if (literals.Count != 0) SqlMapper.ReplaceLiterals(this, command, literals);
299299
}
300300

@@ -448,8 +448,8 @@ public DynamicParameters Output<T>(T target, Expression<Func<T, object>> express
448448
cache[lookup] = setter;
449449
}
450450

451-
// Queue the preparation to be fired off when adding parameters to the DbCommand
452-
MAKECALLBACK:
451+
// Queue the preparation to be fired off when adding parameters to the DbCommand
452+
MAKECALLBACK:
453453
(outputCallbacks ?? (outputCallbacks = new List<Action>())).Add(() =>
454454
{
455455
// Finally, prep the parameter and attach the callback to it

Dapper/SqlMapper.Settings.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public static void SetDefaults()
9090
public static bool PadListExpansions { get; set; }
9191
/// <summary>
9292
/// If set (non-negative), when performing in-list expansions of integer types ("where id in @ids", etc), switch to a string_split based
93-
/// operation if there are this many elements or more. Note that this feautre requires SQL Server 2016 / compatibility level 130 (or above).
93+
/// operation if there are this many elements or more. Note that this feature requires SQL Server 2016 / compatibility level 130 (or above).
9494
/// </summary>
9595
public static int InListStringSplitCount { get; set; } = -1;
9696
}

Dapper/SqlMapper.TypeHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public abstract class StringTypeHandler<T> : TypeHandler<T>
5656
protected abstract T Parse(string xml);
5757

5858
/// <summary>
59-
/// Format an instace into a string (the instance will never be null)
59+
/// Format an instance into a string (the instance will never be null)
6060
/// </summary>
6161
/// <param name="xml">The string to format.</param>
6262
protected abstract string Format(T xml);

0 commit comments

Comments
 (0)