Beispiel #1
0
 public ManufacturerType(IClothesRepository repository)
 {
     Field(x => x.ID);
     Field(x => x.Name);
     Field(x => x.Rating);
     Field(x => x.ContactNumber);
 }
Beispiel #2
0
        public BigBlueStoreQuery(IClothesRepository repository)
        {
            Field <IntGraphType>("StoreContactNumber", "gets user PhoneNumber", resolve: context => { return(8926); });

            Field <ListGraphType <ClothesType> >(
                "clothes",
                arguments: new QueryArguments(new QueryArgument <IntGraphType> {
                Name = "id"
            }),
                resolve: context => {
                var id = context.GetArgument <int?>("id");

                if (id != null)
                {
                    return(repository.GetCloth(id.Value));
                }

                return(repository.GetAll());
            }
                );

            Field <ListGraphType <ManufacturerType> >(
                "manfactures",
                arguments: new QueryArguments(new QueryArgument <IntGraphType> {
                Name = "id"
            }),
                resolve: context =>
            {
                var id = context.GetArgument <int?>("id");

                return(id != null ? repository.GetManfacturer(id.Value) : repository.GetManfacturers());
            }
                );
        }
 public ClothesType(IClothesRepository repository)
 {
     Field(x => x.id); // Leaves of the query
     Field(x => x.Color);
     Field(x => x.Cost);
     Field(x => x.DressType);
     Field(x => x.Size);
     Field <ListGraphType <ManufacturerType> >("manfacturer", resolve: context => {
         return(repository.GetManfacturer(context.Source.id));
     });
 }
Beispiel #4
0
 public BigBlueMutation(IClothesRepository repository)
 {
     Field <ClothesType>(
         "addClothes",
         arguments: new QueryArguments(new QueryArgument <NonNullGraphType <ClothesInputType> > {
         Name = "cloth"
     }),
         resolve: context => {
         var cloth = context.GetArgument <Clothes>("cloth");
         return(repository.AddCloth(cloth));
     });
 }
Beispiel #5
0
 public DataManager(IClothesRepository clothesRepository,
                    ITagsRepository tagsRepository,
                    IBrandsRepository brandsRepository,
                    IBasketsRepository basketsRepository,
                    IImagesRepository imagesRepository,
                    IOrderInfoRepository orderInfoRepository)
 {
     _clothesRepository   = clothesRepository;
     _brandsRepository    = brandsRepository;
     _tagsRepository      = tagsRepository;
     _basketsRepository   = basketsRepository;
     _imagesRepository    = imagesRepository;
     _orderInfoRepository = orderInfoRepository;
 }
Beispiel #6
0
 public UnitOfWork(ApplicationContext dbContext,
                   IClothesRepository clothesRepository,
                   IImagesRepository imagesRepository,
                   ICategoryRepository categoryRepository,
                   IClothSizeRepository clothSizeRepository,
                   ISizeRepository sizeRepository,
                   IOrderRepository orderRepository,
                   IOrderClothRepository orderClothRepository)
 {
     DbContext            = dbContext;
     ClothesRepository    = clothesRepository;
     ImagesRepository     = imagesRepository;
     CategoryRepository   = categoryRepository;
     ClothSizeRepository  = clothSizeRepository;
     SizeRepository       = sizeRepository;
     OrderRepository      = orderRepository;
     OrderClothRepository = orderClothRepository;
 }
 public ShoppingCartController(IClothesRepository clothesRepository, ShoppingCart shoppingCart)
 {
     _clothesRepository = clothesRepository;
     _shoppingCart      = shoppingCart;
 }
 public ShowAllClothesCommand(IClothesRepository clothesRepository)
 {
     _clothesRepository = clothesRepository;
 }
 public ClothesService(RepositoryContext repositoryContext, IClothesRepository clothesRepository)
 {
     this._repositoryContext = repositoryContext;
     this._clothesRepository = clothesRepository;
 }
Beispiel #10
0
 public NavController(IClothesRepository repo)
 {
     repository = repo;
 }
 public WashSessionFactory(IClothesRepository clothesRepository)
 {
     _clothesRepository = clothesRepository;
 }
 public WashSessionMongoDbRepository(ClothesDbContext context, IClothesRepository clothesRepository)
 {
     _clothesRepository = clothesRepository;
     _washSessions = context.WashSessions;
 }
Beispiel #13
0
 public HomeController(IClothesRepository clothesRepository)
 {
     _clothesRepository = clothesRepository;
 }
Beispiel #14
0
 public CartController(IClothesRepository repo)
 {
     repository = repo;
 }
 public ClothesDeleteValidation(IClothesRepository clothesRepository)
 {
     VerifyIfExistent();
     _clothesRepository = clothesRepository;
 }
 public OutfitMongoDbRepository(ClothesDbContext context, IClothesRepository clothesRepository)
 {
     _clothesRepository = clothesRepository;
     _outfits = context.Outfits;
 }
 public OutfitFactory(IClothesRepository clothesRepository)
 {
     _clothesRepository = clothesRepository;
 }
Beispiel #18
0
 public ItemController(IClothesRepository repo)
 {
     repository = repo;
 }
Beispiel #19
0
 public ClothesService(IClothesUpdateCreationValidation updateCreateValidation, IClothesDeleteValidation deleteValidation, IClothesRepository clothesRepository)
 {
     _updateCreateValidation = updateCreateValidation;
     _deleteValidation       = deleteValidation;
     _clothesRepository      = clothesRepository;
 }
 public ShowClothesDetailsCommand(IClothesRepository clothesRepository)
 {
     _clothesRepository = clothesRepository;
 }
 public FindDirtyClothesService(IClothesRepository clothesRepository, IWearLimitPolicy wearLimitPolicy)
 {
     _clothesRepository = clothesRepository;
     _wearLimitPolicy = wearLimitPolicy;
 }
Beispiel #22
0
 public AdminController(IClothesRepository repo)
 {
     repository = repo;
 }
Beispiel #23
0
 public ClothesController(IClothesRepository clothesRepository, ICategoryRepository categoryRepository)
 {
     _clothesRepository  = clothesRepository;
     _categoryRepository = categoryRepository;
 }