public async Task <NetWorthDetailModel> Handle(GetNetWorthQuery request, CancellationToken cancellationToken) { User entity = await BuildUser.BuildFromContext(_context, request.Id); return(new NetWorthDetailModel { UserID = request.Id, DateToNetWorthDict = entity.GetFutureNetWorthByMonth(_dateTime.Now, request.FutureDate) }); }
public async Task <UserDetailModel> Handle(GetUserDetailQuery request, CancellationToken cancellationToken) { User entity = await BuildUser.BuildFromContext(_context, request.Id); return(_mapper.Map <UserDetailModel>(entity)); }