Пример #1
0
        public void DeleteFirebaseDataById(string id, [FromQuery] string access_token)
        {
            if (access_token != "@bazavietnam")
            {
                return;
            }
            var fb = new FirebaseBusinessRepository(new FirebaseFactory(_appSettings));

            fb.DeleteData(id);
        }
Пример #2
0
        public int CopToSQL([FromQuery] string access_token)
        {
            int count = 0;

            if (access_token != "@bazavietnam")
            {
                return(count);
            }
            var fb = new FirebaseBusinessRepository(new FirebaseFactory(_appSettings));

            foreach (var t in fb.GetBusinesses(new Paging {
                Limit = 100
            }))
            {
                count++;
                _businessService.Create(t);
            }
            return(count);
        }