public static void AddFeedAndSave(string author, string movie, string type, ref YourMovies db)
 {
     Rss r=  AddFeed(author, movie, type, ref db);
       RssLista rssLista = new RssLista();
       rssLista.feedit.Add(r);
       SaveFeeds(rssLista, ref db);
 }
 public static void SerialisoiXml(string tiedosto, RssLista ic)
 {
     XmlSerializer xs = new XmlSerializer(ic.GetType());
     TextWriter tw = new StreamWriter(tiedosto);
     try
     {
         xs.Serialize(tw, ic);
     }
     catch (Exception e)
     {
         throw e;
     }
     finally
     {
         tw.Close();
     }
 }
        public static void DeSerialisoiXml(string filePath, ref RssLista feed)
        {
            XmlSerializer deserializer = new XmlSerializer(typeof(RssLista));
            try
            {

                FileStream xmlFile = new FileStream(filePath, FileMode.Open);
                feed = (RssLista)deserializer.Deserialize(xmlFile);
                xmlFile.Close();
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {

            }
        }
 public static void SaveFeeds(RssLista feeds,ref YourMovies db)
 {
     db.Rss.InsertAllOnSubmit(feeds.feedit);
     db.SubmitChanges();
 }