Exemple #1
0
        public ContactController(
            IContactService contactService,

            IFakeDataService fakeDataService
            )
        {
            _contactService = contactService;

            _fakeDataService = fakeDataService;
        }
        public UserController(
            IUserService userService,
            IContactService contactService,

            IFakeDataService fakeDataService
            )
        {
            _userService     = userService;
            _contactService  = contactService;
            _fakeDataService = fakeDataService;
        }
        public OrderDetailsType(IFakeDataService fakeDataService)
        {
            Name = "OrderDetails";

            Field(x => x.OrderId);
            Field(x => x.TotalPrice);

            Field <ProductType>(
                "product",
                resolve: context =>
            {
                //var orderid = context.GetArgument<Int64>("orderId");
                //get product based on orderid from db or any storage. here i am generating fake data;
                return(fakeDataService.GenerateComplex <Product>());
            });
        }
        public ProductType(IFakeDataService fakeDataService)
        {
            Name = "Product";
            Field(x => x.Name);
            Field(x => x.ProductId);
            Field(x => x.TotalPrice);

            Field <PriceType>(
                "price",
                resolve: context =>
            {
                var productId = context.Source.ProductId;
                //get price based on productId from db or any storage. here i am generating fake data;
                return(fakeDataService.GenerateComplex <Price>());
            });
        }
Exemple #5
0
 /// <summary>
 /// Ctor
 /// </summary>
 /// <param name="fakeDataService"></param>
 public HelperController(IFakeDataService fakeDataService)
 {
     _fakeDataService = fakeDataService;
 }
Exemple #6
0
 public HomeController(IFakeDataService dataService) => this._dataService = dataService;
Exemple #7
0
 public DGTUController(IFakeDataService fakeDataService)
 {
     FakeDataService = fakeDataService;
 }
Exemple #8
0
 public RaffleController(IFakeDataService fakeDataService)
 {
     _fakeDataService = fakeDataService;
 }
 public LocalDatabaseService()
 {
     _fakeDataService = new FakeDataService();
     LoadDatabase();
     LoadTables();
 }
 public OrderProvider(IFakeDataService fakeDataService)
 {
     _fakeDataService = fakeDataService;
 }