Skip to content

Commit

Permalink
removed redundant else keywords
Browse files Browse the repository at this point in the history
  • Loading branch information
amirkhaniansev committed Dec 10, 2018
1 parent ea3887a commit 385bb3d
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/AccessCore/Repository/DataManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public object Operate<TResult>(string operationName, IEnumerable<KeyValuePair<st
var operationInfo = this.GetOperationInfo(operationName);

// getting parameters
var spParams = null as IEnumerable<KeyValuePair<string, object>>;
var spParams = default(IEnumerable<KeyValuePair<string, object>>);

// constructing parameters
if (parameters != null)
Expand All @@ -67,12 +67,14 @@ public object Operate<TResult>(string operationName, IEnumerable<KeyValuePair<st
// executing specific operation
if (operationInfo.ReturnDataType == ReturnDataType.Entity)
return this._spExecuter.ExecuteEntitySp<TResult>(operationInfo.SpName, spParams);
else if (operationInfo.ReturnDataType == ReturnDataType.Enumerable)

if (operationInfo.ReturnDataType == ReturnDataType.Enumerable)
return this._spExecuter.ExecuteSp<TResult>(operationInfo.SpName, spParams);
else if (operationInfo.ReturnDataType == ReturnDataType.Scalar)

if (operationInfo.ReturnDataType == ReturnDataType.Scalar)
return this._spExecuter.ExecuteScalarSp<object>(operationInfo.SpName, spParams);
else
return this._spExecuter.ExecuteSpNonQuery(operationInfo.SpName, spParams);

return this._spExecuter.ExecuteSpNonQuery(operationInfo.SpName, spParams);
}

/// <summary>
Expand Down

0 comments on commit 385bb3d

Please sign in to comment.