Exemplo n.º 1
0
        public Boolean addNews(SiteNewsModel siteNewsModel)
        {
            geekinsidekmsEntities context = new geekinsidekmsEntities();

            DAL.SiteNews siteNews = new DAL.SiteNews();
            siteNews.Title = siteNewsModel.Title;
            siteNews.NewsContent = siteNewsModel.NewsContent;
            siteNews.PubTime = siteNewsModel.PubTime;
            siteNews.IsOnTop = siteNewsModel.IsOnTop;
            context.AddToSiteNews(siteNews);
            context.SaveChanges();
            return true;
        }