示例#1
0
 public void UpdateTag(Tag tag)
 {
     try
     {
         context.Entry(tag).State = EntityState.Modified;
         context.SaveChanges();
     }
     catch (Exception ex)
     {
         Debug.WriteLine(ex.Message);
         throw ex;
     }
 }
示例#2
0
        public void UpdateArticle(Article article)
        {
            try
            {
                context.Entry(article).State = EntityState.Modified;

                context.SaveChanges();
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex.Message);
                throw ex;
            }
        }