public async Task <Domain.Tea.Bag> Translate(ViewModels.Tea.Bag source) { var applicationUser = await UserRepository.GetItemAsync(); var bagsCount = await BagRepository.SearchRowCountAsync($"{nameof(Domain.Tea.Bag.OwnerId).ToLower()} = {applicationUser.Id}"); var localNow = Clock.GetCurrentInstant().InUtc().LocalDateTime.Date; return(new Domain.Tea.Bag(null, applicationUser.Id, Convert.ToInt32(bagsCount), RefValueTranslator.Translate(source.Brand), source.Serie, source.Flavour, source.Hallmark, RefValueTranslator.Translate(source.BagType), RefValueTranslator.Translate(source.Country), source.SerialNumber, localNow, source.ImageId)); }
public QRController(BagRepository bagRepository, AuthService authService, UserRepository userRepository) { this.bagRepository = bagRepository; this.authService = authService; this.userRepository = userRepository; }
public BagService() { repo = new BagRepository(); }
public UserController(UserRepository userRepository, BagRepository bagRepository, AuthService authService) { this.userRepository = userRepository; this.bagRepository = bagRepository; this.authService = authService; }
public ReceiveController(BagRepository bagRepository) { this.bagRepository = bagRepository; }