/// <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); }
/// <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); }
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); }
/// <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); }
/// <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); }