public async Task <IHttpActionResult> Put(ActiveUserCommand command) { try { await _appRepository.ActiveUser(command.UserId, command.AppType); return(Ok(new ResponseModel { Message = "فعال سازی کاربر", Success = true, })); } catch (Exception e) { return(Ok(new ResponseModel { Message = e.Message, Success = false, })); } }
public async Task Consume(ConsumeContext <IActiveUserEvent> context) { var message = context.Message; await _appRepository.ActiveUser(message.UserId.ToString(), message.AppType); }