We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
if _unitOfWork is null then here can crash: transaction: _unitOfWork.Transaction. I'm right?
//namespace Identity.Dapper.Repositories var selectFunction = new Func<DbConnection, Task<TUser>>(async x => { var dynamicParameters = new DynamicParameters(); dynamicParameters.Add("Email", email); var query = _queryFactory.GetQuery<SelectUserByEmailQuery>(); var userDictionary = new Dictionary<TKey, TUser>(); var result = await x.QueryAsync<TUser, TUserRole, TUser>(sql: query, param: dynamicParameters, transaction: _unitOfWork.Transaction, map: UserRoleMapping(userDictionary), splitOn: "UserId"); if (userDictionary.Count > 0) return userDictionary.FirstOrDefault().Value; return result.FirstOrDefault(); }); DbConnection conn = null; if (_unitOfWork?.Connection == null) { using (conn = _connectionProvider.Create()) { await conn.OpenAsync(); return await selectFunction(conn); } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
if _unitOfWork is null then here can crash: transaction: _unitOfWork.Transaction. I'm right?
The text was updated successfully, but these errors were encountered: