private async Task <List <FirebaseObject <MockFirebasePerson> > > CreateMocks()
        {
            var people  = _fixture.PersonList;
            var results = new List <FirebaseObject <MockFirebasePerson> >();

            foreach (var person in people)
            {
                var result = await _adminControllerQueryEntity.Post(person);

                results.Add(result);
            }

            return(results);
        }
Example #2
0
        public async Task <ActionResult> Post(Auction auction)
        {
            FirebaseObject <Auction> result = null;

            if (this.IsAdministrator())
            {
                result = await _adminAuctionQuery.Post(auction);
            }
            else
            {
                result = await _userAuctionQuery.Post(auction);
            }
            return(null != result
                ? this.Ok(JsonConvert.SerializeObject(result))
                : this.InternalServerError(string.Empty));
        }