예제 #1
0
        /// <summary>
        ///  Wywołanie funcji Update to kanałyt LoadOneKanal
        /// </summary>
        /// <param name="kanal"></param>/
        /// <returns></returns>
        public static List <Kanaly> LoadOneKanal(string kanal)
        {
            MongoCRUD db   = new MongoCRUD("RSS");
            var       load = db.LoadRecord <Kanaly>("Kanaly", kanal);

            return(load);
        }
예제 #2
0
        /// <summary>
        ///  Wywołanie funcji Update to kanałyt LoadKanaly
        /// </summary>
        /// <returns></returns>
        public static List <Kanaly> LoadKanaly()
        {
            MongoCRUD db         = new MongoCRUD("RSS");
            var       loadkanaly = db.LoadRecords <Kanaly>("Kanaly");

            return(loadkanaly);
        }
예제 #3
0
        public static string LoadArticle(string kanal, string title)
        {
            MongoCRUD db   = new MongoCRUD("RSS");
            var       load = db.LoadRecord <Kanaly>("Kanaly", kanal).First();
            //foreach (var items in load.item)
            //{

            //    Console.WriteLine(items.Title);

            //}

            var art = load.item.Where(x => x.Title == title).First();


            return(art.Text);
        }
예제 #4
0
        /// <summary>
        /// Wywołanie funkcji InsertToKanaly
        /// </summary>
        /// <param name="insertToKanaly"></param>
        public static void InsertToKanaly(Kanaly insertToKanaly)
        {
            MongoCRUD db = new MongoCRUD("RSS");

            db.InsertRecord("Kanaly", insertToKanaly);
        }
예제 #5
0
        /// <summary>
        /// Wywołanie funcji Update to kanałyt UpdateToKanaly
        /// <param name="toKanaly"></param>
        /// <param name="filter"></param>
        public static void UpdateToKanaly(Kanaly toKanaly, Kanaly filter)
        {
            MongoCRUD db = new MongoCRUD("RSS");

            db.UpdateItem("Kanaly", toKanaly, filter);
        }