// удаление документа
        public async Task Remove(string code)
        {
            var filter = new BsonDocument("Code", new BsonDocument("$eq", code));
            await Specialities.DeleteOneAsync(filter);

            await Specialities_Proffesions.DeleteManyAsync(filter);

            await Specialities_Subjects.DeleteManyAsync(filter);

            await Comment_Specialities.DeleteManyAsync(filter);
        }
        public async Task <List <Comment_Speciality> > GetComments(string code)
        {
            List <Comment_Speciality> results = null;
            var filter = new BsonDocument("Code", new BsonDocument("$eq", code));

            results = await Comment_Specialities.Find <Comment_Speciality>(filter).ToListAsync();

            if (results != null)
            {
                return(results);
            }
            else
            {
                return(null);
            }
        }
 public async Task RemoveComment(string id)
 {
     //var filter = new BsonDocument("Code", new BsonDocument("$eq", code));
     await Comment_Specialities.DeleteOneAsync(new BsonDocument("_id", new ObjectId(id)));
 }
 public async Task CreateComment(Comment_Speciality s)
 {
     await Comment_Specialities.InsertOneAsync(s);
 }