邮件服务注入
parent
bafd8759d8
commit
536d80718e
|
@ -47,6 +47,9 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
_hostEnvironment = hostEnvironment;
|
_hostEnvironment = hostEnvironment;
|
||||||
|
|
||||||
|
_mapper = mapper;
|
||||||
|
|
||||||
|
_tokenService = tokenService;
|
||||||
_userRepository = userRepository;
|
_userRepository = userRepository;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -454,6 +454,7 @@ namespace IRaCIS.Application.Services
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="userAddModel"></param>
|
/// <param name="userAddModel"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
|
[UnitOfWork]
|
||||||
public async Task<IResponseOutput<UserAddedReturnDTO>> AddUser(UserCommand userAddModel)
|
public async Task<IResponseOutput<UserAddedReturnDTO>> AddUser(UserCommand userAddModel)
|
||||||
{
|
{
|
||||||
if (await _userRepository.AnyAsync(t => t.UserName == userAddModel.UserName || (t.EMail == userAddModel.EMail && t.UserTypeId == userAddModel.UserTypeId)))
|
if (await _userRepository.AnyAsync(t => t.UserName == userAddModel.UserName || (t.EMail == userAddModel.EMail && t.UserTypeId == userAddModel.UserTypeId)))
|
||||||
|
|
Loading…
Reference in New Issue