Пример #1
0
        // Creates new incident
        public Boolean SetNewIncident(IncidentModel incident)
        {
            var collection = ConfigDB.GetDatabase().GetCollection <IncidentModel>("Incidents");

            collection.InsertOne(incident);
            return(true);
        }
Пример #2
0
        /// <summary>
        /// set new key with email and key in the DB
        /// </summary>
        /// <param name="key"></param>
        /// <param name="email"></param>
        public void SetKey(string key, string email)
        {
            KeyModel keyModel = new KeyModel()
            {
                Email = email, Key = key
            };
            var collection = ConfigDB.GetDatabase().GetCollection <KeyModel>("ResetKey");

            collection.InsertOne(keyModel);
        }
Пример #3
0
        //Insert single user
        public void InsertUser(UserModel user)
        {
            //Select collection
            var collection = ConfigDB.GetDatabase().GetCollection <UserModel>("Users");

            collection.InsertOne(user);
        }