/// <summary> /// Добавление детальной информацией RSS /// </summary> /// <param name="item"></param> public void AddDetailRSSItems(ModelTableDetailRSS item) { RealmDB.Write(() => { RealmDB.Add(item); }); }
/// <summary> /// Удаление детальной информацией RSS /// </summary> /// <param name="item"></param> public void DeleteDetailRSSItems(ModelTableDetailRSS item) { using (var db = RealmDB.BeginWrite()) { RealmDB.Remove(item); db.Commit(); } }
/// <summary> /// Метод парсинга данных RSS и добавление в бд /// </summary> /// <param name="rss"></param> /// <returns></returns> private ModelTableDetailRSS AddDetailRSS(XElement rss) { var model = new ModelTableDetailRSS() { IdRSS = modelRSS.Id, Title = rss.Element("title").Value, Description = rss.Element("description").Value, Link = rss.Element("link").Value, PudDate = ChackedDateTime(rss.Element("pubDate").Value) }; AddDetailRSSItems(model); return(model); }