Example #1
0
 public AccountRepository(IMapper mapper, UserManager <User> userManager, IJwtTokenService token, IUserAccessorService userAccessor)
 {
     _mapper       = mapper;
     _userManager  = userManager;
     _token        = token;
     _userAccessor = userAccessor;
 }
 public GoodsReceivedNoteRepository(IMapper mapper, IGoodsReceivedNoteService goodReceivedNote,
                                    IUserAccessorService userAccessor, IPurchaseOrderService purchaseOrder,
                                    IPurchaseOrderItemService purchaseOrderItem, IGoodsReceivedNoteItemService goodsReceivedNoteItem)
 {
     _mapper                = mapper;
     _purchaseOrder         = purchaseOrder;
     _goodReceivedNote      = goodReceivedNote;
     _purchaseOrderItem     = purchaseOrderItem;
     _goodsReceivedNoteItem = goodsReceivedNoteItem;
     _userAccessor          = userAccessor;
 }
Example #3
0
        public static CurrentUser GetCurrentUser(IUserAccessorService userAccessor)
        {
            var user = userAccessor.GetCurrentUser();

            if (user == null || user.UserId == Guid.Empty)
            {
                throw new RestException(HttpStatusCode.BadRequest, "User details not found. Login again.");
            }

            return(user);
        }
Example #4
0
 internal MessageCommandHandler(IUserAccessorService userService, IChannelAccessorService channelService, IMessageGeneratorService messageGeneratorService)
 {
     _userService             = userService;
     _channelService          = channelService;
     _messageGeneratorService = messageGeneratorService;
 }
 public PurchaseOrderRepository(IMapper mapper, IPurchaseOrderService purchaseOrder, IUserAccessorService userAccessor)
 {
     _mapper        = mapper;
     _purchaseOrder = purchaseOrder;
     _userAccessor  = userAccessor;
 }